1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4
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 Revert "source4: Use wbc_sids_to_xids" 2014-02-18 10:29:24 +01:00
build/pasn1
cldap_server cldap: quieten error when abandon packet is sent 2013-12-06 07:13:29 +01:00
client s4:client: fix some compiler warnings 2014-02-13 11:54:13 +01:00
cluster s4:cluster: use DBWRAP_LOCK_ODER_NONE for local_db_tmp_open() 2014-02-07 16:06:07 +01:00
dns_server s4-dns: Ignore duplicate dns zones from multiple locations in dlz_bind9 2013-11-30 14:22:57 +11:00
dsdb s4:dsdb/repl: make use of dcerpc_binding_get_string_option("host") 2014-02-13 11:54:17 +01:00
echo_server s4:echo_server fix compiler warnings 2013-12-12 14:21:28 -08:00
heimdal heimdal: Use krb5_free_default_realm() for free() 2014-02-21 15:59:28 +01:00
heimdal_build heimdal_build: only enable libintl functions if everything was found 2014-02-20 01:28:24 +01:00
include Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls. 2012-06-28 17:15:16 -07:00
kdc kdc: Free the resource which is not used anymore 2014-02-21 15:59:28 +01:00
ldap_server s4:dsdb/rootdse: Support netlogon request 2013-11-11 23:00:54 +01:00
lib s4:lib/com/dcom: use dcerpc_parse_binding() to create the binding 2014-02-13 11:54:17 +01:00
libcli Define the winbindd socket directory when building wbclient 2014-02-19 16:25:42 +01:00
libnet s4:libnet: add const to libnet_JoinDomain->out.samr_binding 2014-02-13 11:54:16 +01:00
librpc Revert "winbind4: Remove unused winbind_get_idmap irpc operation" 2014-02-18 10:28:28 +01:00
nbt_server lib/param: handle non-constant strings properly by passing in a memory context 2014-02-20 10:11:06 +13:00
ntp_signd build: Build with system md5.h on OpenIndiana 2013-06-19 21:32:36 +02:00
ntptr spoolss: make spoolss deal with ndr64 SetForm by using proper container object. 2013-01-17 17:11:37 +01:00
ntvfs s4: tidy up vfs smb2 in regards to using share_string_option 2014-02-24 19:16:48 +01:00
param lib/param: handle non-constant strings properly by passing in a memory context 2014-02-20 10:11:06 +13:00
rpc_server lib/param: handle non-constant strings properly by passing in a memory context 2014-02-20 10:11:06 +13:00
script lib/param: generate the param_functions.h containing the prototypes 2014-02-12 13:17:13 +13:00
scripting samba_upgradedns: message the user if they need to change smb.conf 2014-01-07 06:05:15 +01:00
selftest s4:selftest: run wbinfo tests at the end... 2014-01-06 01:16:13 +01:00
setup samba-tool domain join subdomain: Rework sambadns.py to allow setup of DomainDNSZone only 2013-10-11 10:27:49 +02:00
smb_server s4: pass down a memory context when performing share_string_option, to allow substitutions 2014-02-20 10:11:00 +13:00
smbd param: rename lp function and variable from 'piddir' to 'pid_directory' 2014-02-07 16:19:11 -08:00
torture torture: Fix a torture crash with -O3 2014-02-28 21:27:11 +01:00
utils oLschema2ldif: Add some NULL checks 2013-11-11 21:04:08 +01:00
web_server Move python modules from source4/scripting/python/ to python/. 2013-03-02 03:57:34 +01:00
winbind Revert "winbind4: Remove unused winbind_get_idmap irpc operation" 2014-02-18 10:28:28 +01:00
wrepl_server s4:wrepl_server: avoid some compiler warnings 2014-02-13 11:54:13 +01:00
.clang_complete s3-build: Add .clang_complete. 2011-10-27 17:09:50 +02:00
.valgrind_suppressions
wscript_build build: Add missing deps and make MESSAGING a private library 2012-06-07 06:45:06 +02:00