1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/torture
Volker Lendecke 7e5350602e torture: Fix a torture crash with -O3
When compiled with -O3, smbtorture can crash after the following valgrind
trace:

==16944== Conditional jump or move depends on uninitialised value(s)
==16944==    at 0x57FFAC3: ndr_push_unique_ptr (ndr_basic.c:730)
==16944==    by 0x58CB855: ndr_push_spoolss_SetPrinterInfo (ndr_spoolss.c:7939)
==16944==    by 0x58E2F95: ndr_push_spoolss_SetPrinter (ndr_spoolss.c:24724)
==16944==    by 0x417C78C: dcerpc_binding_handle_call_send (binding_handle.c:410)
==16944==    by 0x417C986: dcerpc_binding_handle_call (binding_handle.c:547)
==16944==    by 0x522059C: dcerpc_spoolss_SetPrinter_r (ndr_spoolss_c.c:1722)
==16944==    by 0x2853BD: test_sd_set_level (spoolss.c:1248)
==16944==    by 0x28F146: test_PrinterInfo_SD (spoolss.c:1962)
==16944==    by 0x2A3C31: test_EnumPrinters_old (spoolss.c:6589)
==16944==    by 0x41F6D66: internal_torture_run_test.part.0 (torture.c:442)
==16944==    by 0x41F711F: torture_run_tcase_restricted (torture.c:758)
==16944==    by 0x2018E8: run_matching.isra.1 (smbtorture.c:103)
==16944==    by 0x20176B: run_matching.isra.1 (smbtorture.c:95)
==16944==    by 0x20176B: run_matching.isra.1 (smbtorture.c:95)
==16944==    by 0x201C12: torture_run_named_tests (smbtorture.c:143)
==16944==    by 0x202F5B: main (smbtorture.c:661)

My assumption is that with optimization gcc makes use of the fact that the
structures that this patch moves go out of scope.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Feb 28 21:27:11 CET 2014 on sn-devel-104
2014-02-28 21:27:11 +01:00
..
auth auth/gensec: introduce gensec_internal.h 2013-08-10 09:19:02 +02:00
basic smbtorture: New torture test for bug #9870. 2013-12-05 10:05:06 +01:00
dfs torture: change dfs tests now that we return a level 4 when level 4 is requested 2012-04-26 21:25:37 +02:00
dns torture: Ensure that GSSAPI and SPNEGO packets are accepted by dlz_bind9 2013-09-04 11:25:10 +02:00
drs s4:torture/drs: make use of dcerpc_binding_get_string_option("host") 2014-02-13 11:54:18 +01:00
ldap s4:torture/netlogon: Test netlogon with additional attrs 2013-11-12 00:57:19 +01:00
ldb
libnet s4:torture/libnet: make use of dcerpc_binding_get_string_option("host") 2014-02-13 11:54:18 +01:00
libnetapi source4/torture: add talloc_stackframe() 2012-07-18 09:31:07 +02:00
libsmbclient waf: restore libsmbclient handling. 2011-09-15 15:31:59 +02:00
local lib/replace: Try to fix build on HP-UX for os2_delete test 2012-09-23 14:31:01 +10:00
man docs: remove duplicate mention of "smbtorture" in smbtorture manpage. 2013-11-19 09:52:39 +01:00
nbench s4:torture: replace shm_setup() with anonymous_shared_allocate() 2012-07-25 12:15:02 +02:00
nbt s4:torture/nbt/dgram.c - NBT samlogon requests don't return the PDC name as UNC path 2012-01-04 18:33:06 +01:00
ndr s4-torture: Always compile backupkey ndr testsuite. 2013-05-29 11:29:50 +02:00
ntp libcli/auth: also set secure channel type in netlogon_creds_client_init(). 2013-08-05 10:30:00 +02:00
rap s4:torture/rap/printing: check smbcli_rap_netprintqgetinfo() WERR status 2011-12-17 01:09:32 +01:00
raw s4-torture: Use talloc for asprintf. 2013-12-06 01:14:09 +01:00
rpc torture: Fix a torture crash with -O3 2014-02-28 21:27:11 +01:00
smb2 torture: add zero length FSCTL_SRV_COPYCHUNK test 2014-02-06 16:15:26 -08:00
tests selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
unix s4-torture: Use torture_fail() in the unix.unix_info2 test 2012-08-20 15:36:47 +02:00
winbind torture: Ensure that GSSAPI and SPNEGO packets are accepted by dlz_bind9 2013-09-04 11:25:10 +02:00
gentest.c s4:torture/gentest: make use of cli_credentials_get_username() 2013-08-05 17:48:03 +12:00
locktest.c s4:torture/locktest: fix compiler warning 2012-06-05 17:33:49 +02:00
masktest.c s4-modules Remove lp_ctx from init functions that no longer need it 2011-06-06 17:37:51 +10:00
shell.c s4:torture/shell: simplify cli_credentials_set_password() call 2013-08-05 17:48:03 +12:00
smbtorture.c s4:torture: use dcerpc_binding_get_string_option("host") in smbtorture.c 2014-02-13 11:54:17 +01:00
smbtorture.h
torture.c Revert making public of the samba-module library. 2011-12-03 08:36:30 +01:00
util_smb.c s4:torture: add support for SMB_EXTENDED_SIGNATURES during SMBtconX 2012-08-04 09:10:22 +02:00
util.h torture: Add a new w2k12 target 2013-09-05 13:46:10 -07:00
wscript_build s4:torture/ldap: Add test for netlogon over tcp 2013-11-11 23:00:55 +01:00