summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2016-04-18 16:34:06 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-04-25 10:35:15 +0200
commitde590daa1c10d28908652c3bf8bb7f04069408b1 (patch)
tree0334c58a1de741bbfdae1f8119a616b1def900b4 /source4/torture/raw
parenta22ccb04a030ca9293df74ec0e5b3f8721702ae3 (diff)
downloadsamba-de590daa1c10d28908652c3bf8bb7f04069408b1.tar.gz
s4:torture:raw: fix 'Syscall param writev(vector[...])' valgrind error
running smbtorture test raw.streams.createdisp.createdisp results in the following valgrind trace ==30946== Syscall param writev(vector[...]) points to uninitialised byte(s) ==30946== at 0xFBA2C87: writev (in /lib64/libc-2.19.so) ==30946== by 0x106CB033: writev_handler (async_sock.c:340) ==30946== by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26) ==30946== by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26) ==30946== by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26) ==30946== by 0x5AE3400: smbcli_request_receive (rawrequest.c:416) ==30946== by 0x5AE343E: smbcli_request_simple_recv (rawrequest.c:430) ==30946== by 0x5ADC8BC: smb_raw_close (rawfile.c:847) ==30946== by 0x9BE60B4: smbcli_close (clifile.c:316) ==30946== by 0x209F0D: create_file_with_stream (streams.c:1502) ==30946== by 0x20A072: test_stream_create_disposition (streams.c:1527) ==30946== by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856) ==30946== by 0x955368F: internal_torture_run_test (torture.c:442) ==30946== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==30946== by 0x2600D6: run_matching (smbtorture.c:110) ==30946== by 0x25FF98: run_matching (smbtorture.c:95) ==30946== by 0x25FF98: run_matching (smbtorture.c:95) ==30946== by 0x2601F7: torture_run_named_tests (smbtorture.c:143) ==30946== by 0x261E76: main (smbtorture.c:665) ==30946== Address 0x187ebbc6 is 598 bytes inside a block of size 1,325 alloc'd ==30946== at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==30946== by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5) ==30946== by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26) ==30946== by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322) ==30946== by 0x5ADFAB7: smbcli_transport_setup_subreq (clitransport.c:254) ==30946== by 0x5ADFC37: smbcli_transport_send (clitransport.c:326) ==30946== by 0x5AE33C3: smbcli_request_send (rawrequest.c:400) ==30946== by 0x5ADC869: smb_raw_close_send (rawfile.c:832) ==30946== by 0x5ADC8AC: smb_raw_close (rawfile.c:846) ==30946== by 0x9BE60B4: smbcli_close (clifile.c:316) ==30946== by 0x209F0D: create_file_with_stream (streams.c:1502) ==30946== by 0x20A072: test_stream_create_disposition (streams.c:1527) ==30946== by 0x16B21D: wrap_simple_1smb_test (util_smb.c:856) ==30946== by 0x955368F: internal_torture_run_test (torture.c:442) ==30946== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==30946== by 0x2600D6: run_matching (smbtorture.c:110) ==30946== by 0x25FF98: run_matching (smbtorture.c:95) ==30946== by 0x25FF98: run_matching (smbtorture.c:95) ==30946== by 0x2601F7: torture_run_named_tests (smbtorture.c:143) ==30946== by 0x261E76: main (smbtorture.c:665 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/streams.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index 103a2c3057d..8c60d6c79a6 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -1473,6 +1473,8 @@ static bool create_file_with_stream(struct torture_context *tctx,
bool ret = true;
union smb_open io;
+ ZERO_STRUCT(io);
+
/* Create a file with a stream */
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid.fnum = 0;