1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/lib/async_req
Volker Lendecke 4524daafb8 lib: Fix a valgrind error
I just came across this failure with a new test:

==16654== Invalid read of size 4
==16654==    at 0x4950947: tevent_req_is_in_progress (tevent_req.c:270)
==16654==    by 0x5AEEE8F: writev_trigger (async_sock.c:375)
==16654==    by 0x494F9E7: tevent_queue_immediate_trigger (tevent_queue.c:149)
==16654==    by 0x494F53C: tevent_common_invoke_immediate_handler (tevent_immediate.c:166)
==16654==    by 0x494F642: tevent_common_loop_immediate (tevent_immediate.c:203)
==16654==    by 0x4959E5E: epoll_event_loop_once (tevent_epoll.c:918)
==16654==    by 0x495665A: std_event_loop_once (tevent_standard.c:110)
==16654==    by 0x494DFCE: _tevent_loop_once (tevent.c:772)
==16654==    by 0x4950A6A: tevent_req_poll (tevent_req.c:300)
==16654==    by 0x4D166C9: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==16654==    by 0x18C98B: run_readdir_timestamp (test_readdir_timestamp.c:489)
==16654==    by 0x161BC5: run_test (torture.c:14896)
==16654==    by 0x162726: main (torture.c:15136)
==16654==  Address 0x91bb878 is 216 bytes inside a block of size 853 free'd
==16654==    at 0x48369AB: free (vg_replace_malloc.c:530)
==16654==    by 0x49B405E: _tc_free_internal (talloc.c:1221)
==16654==    by 0x49B4116: _talloc_free_internal (talloc.c:1247)
==16654==    by 0x49B547C: _talloc_free (talloc.c:1789)
==16654==    by 0x50ECE3B: smb2cli_req_writev_done (smbXcli_base.c:3468)
==16654==    by 0x4950648: _tevent_req_notify_callback (tevent_req.c:141)
==16654==    by 0x49507A9: tevent_req_finish (tevent_req.c:193)
==16654==    by 0x49507D6: _tevent_req_done (tevent_req.c:199)
==16654==    by 0x5AEEE28: writev_do (async_sock.c:363)
==16654==    by 0x5AEEE83: writev_trigger (async_sock.c:374)
==16654==    by 0x494F9E7: tevent_queue_immediate_trigger (tevent_queue.c:149)
==16654==    by 0x494F53C: tevent_common_invoke_immediate_handler (tevent_immediate.c:166)
==16654==    by 0x494F642: tevent_common_loop_immediate (tevent_immediate.c:203)
==16654==    by 0x4959E5E: epoll_event_loop_once (tevent_epoll.c:918)
==16654==    by 0x495665A: std_event_loop_once (tevent_standard.c:110)
==16654==    by 0x494DFCE: _tevent_loop_once (tevent.c:772)
==16654==    by 0x4950A6A: tevent_req_poll (tevent_req.c:300)
==16654==    by 0x4D166C9: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==16654==    by 0x18C98B: run_readdir_timestamp (test_readdir_timestamp.c:489)
==16654==    by 0x161BC5: run_test (torture.c:14896)
==16654==    by 0x162726: main (torture.c:15136)
==16654==  Block was alloc'd at
==16654==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==16654==    by 0x49B300F: __talloc_with_prefix (talloc.c:782)
==16654==    by 0x49B31E6: _talloc_pool (talloc.c:837)
==16654==    by 0x49B3394: _talloc_pooled_object (talloc.c:905)
==16654==    by 0x49501A6: _tevent_req_create (tevent_req.c:79)
==16654==    by 0x5AEE956: writev_send (async_sock.c:266)
==16654==    by 0x50ECBCA: smb2cli_req_compound_submit (smbXcli_base.c:3396)
==16654==    by 0x50ECD49: smb2cli_req_send (smbXcli_base.c:3447)
==16654==    by 0x50FE34F: smb2cli_create_send (smb2cli_create.c:153)
==16654==    by 0x490325E: cli_smb2_create_fnum_send (cli_smb2_fnum.c:273)
==16654==    by 0x48D0146: cli_ntcreate_send (clifile.c:2504)
==16654==    by 0x18B737: create_ts_send (test_readdir_timestamp.c:59)
==16654==    by 0x18BF77: create_ts_files_send (test_readdir_timestamp.c:253)
==16654==    by 0x18C35C: create_files_send (test_readdir_timestamp.c:336)
==16654==    by 0x18C953: run_readdir_timestamp (test_readdir_timestamp.c:482)
==16654==    by 0x161BC5: run_test (torture.c:14896)
==16654==    by 0x162726: main (torture.c:15136)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 23 21:53:38 UTC 2020 on sn-devel-184
2020-04-23 21:53:38 +00:00
..
async_connect_send_test.c lib: tevent: Use system <tevent.h>, not internal header path (except in self-test). 2017-08-16 20:58:13 +02:00
async_sock.c lib: Fix a valgrind error 2020-04-23 21:53:38 +00:00
async_sock.h lib: Add accept_send/recv 2016-06-07 14:34:10 +02:00
wscript_build build: Do not build selftest binaries for builds without --enable-selftest 2019-11-22 11:48:59 +00:00