[PATCH] some valgrind related patches

Noel Power nopower at suse.com
Wed Nov 4 14:48:51 UTC 2015


Hi,

On 03/11/15 19:30, Volker Lendecke wrote:
> On Tue, Nov 03, 2015 at 04:52:29PM +0000, Noel Power wrote:
>> Hi,
>> was running some tests against our sle (samba-4.2.x) sources, came
>> across some valgrind errors, these patches are at least relevant for
>> master too
> First of all: Thanks for looking into this!
>
> For all patches: Can we get rid of the DEVELOPER ifdefs?
>
> [PATCH 1/6]: R-b: me without the DEVELOPER
> [PATCH 2/6]: R-b: me
>
> [PATCH 3/6]: Hmm. Where does this come from? Do we send
> more? I'd have thought that we only send what we actually
> fill in.

==20852== Syscall param writev(vector[...]) points to uninitialised byte(s)
==20852==    at 0x8CEF477: writev (in /lib64/libc-2.19.so)
==20852==    by 0xA2BDD54: sys_writev (sys_rw.c:68)
==20852==    by 0xA2BDEE1: write_data_iov (sys_rw_data.c:49)
==20852==    by 0xA2BDFE5: write_data (sys_rw_data.c:94)
==20852==    by 0x5446ABC: srv_send_smb (process.c:251)
==20852==    by 0x53F6A32: send_trans2_replies (trans2.c:1031)
==20852==    by 0x53FE74E: call_trans2findnext (trans2.c:3158)
==20852==    by 0x5412D0A: handle_trans2 (trans2.c:8968)
==20852==    by 0x5413E28: reply_trans2 (trans2.c:9243)
==20852==    by 0x544A6F4: switch_message (process.c:1649)
==20852==    by 0x544A8B5: construct_reply (process.c:1685)
==20852==    by 0x544B9AB: process_smb (process.c:1931)
==20852==  Address 0x181ae5bb is 187 bytes inside a block of size 5,164
alloc'd
==20852==    at 0x4C29110: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20852==    by 0x5CB6D78: __talloc_with_prefix (talloc.c:668)
==20852==    by 0x5CB6F0B: __talloc (talloc.c:708)
==20852==    by 0x5CB72BB: _talloc_named_const (talloc.c:865)
==20852==    by 0x5CBA8BC: _talloc_array (talloc.c:2587)
==20852==    by 0x54499CA: create_outbuf (process.c:1366)
==20852==    by 0x5449A8C: reply_outbuf (process.c:1388)
==20852==    by 0x53F64E8: send_trans2_replies (trans2.c:939)
==20852==    by 0x53FE74E: call_trans2findnext (trans2.c:3158)
==20852==    by 0x5412D0A: handle_trans2 (trans2.c:8968)

>
> [PATCH 4/6]: Why not ZERO_STRUCT?
why not indeed, done & changed
> [PATCH 5/6]: I'd go with struct lock_struct lock = {0};
> [PATCH 6/6]: ENOPATCH? :-)
no, just 6/6 was not to do with this but instead some temporary patch to
do with something unrelated

see new version(s) attached (with #if DEVELOPER removed)

Noel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fix-writev-vector-.-points-to-uninitialised-bytes-in.patch
Type: application/mbox
Size: 1022 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151104/e8ad78f1/0003-fix-writev-vector-.-points-to-uninitialised-bytes-in.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-fix-Invalid-read-of-size-1-in-reply_search.patch
Type: application/mbox
Size: 1339 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151104/e8ad78f1/0002-fix-Invalid-read-of-size-1-in-reply_search.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-writev-vector-.-points-to-uninitialised-bytes-in.patch
Type: application/mbox
Size: 1035 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151104/e8ad78f1/0001-fix-writev-vector-.-points-to-uninitialised-bytes-in.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-remove-many-valgrind-errors-for-base.lock-test.patch
Type: application/mbox
Size: 922 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151104/e8ad78f1/0005-remove-many-valgrind-errors-for-base.lock-test.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-fix-uninitialised-read-in-process_host_announce.patch
Type: application/mbox
Size: 840 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151104/e8ad78f1/0004-fix-uninitialised-read-in-process_host_announce.mbox>


More information about the samba-technical mailing list