Bug 7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when "mangling method = hash"
valgrind Conditional jump or move depends on uninitialised value(s) error whe...
Status: RESOLVED FIXED
Product: Samba 3.5
Classification: Unclassified
Component: File services
3.5.0pre2
All All
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-18 14:21 UTC by Jeremy Allison
Modified: 2010-02-19 02:21 UTC (History)
0 users

See Also:


Attachments
git-am fix for 3.5.0rc3 (1.04 KB, patch)
2010-02-18 14:27 UTC, Jeremy Allison
vl: review+
Details
git-am fix for 3.4.6. (1.04 KB, patch)
2010-02-18 14:28 UTC, Jeremy Allison
vl: review+
Details
git-am fix for 3.3.1.. (1.04 KB, patch)
2010-02-18 14:29 UTC, Jeremy Allison
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2010-02-18 14:21:01 UTC
When "mangling method = hash" is set in smb.conf, we get the valgrind error:

==29096== Conditional jump or move depends on uninitialised value(s)
==29096==    at 0x5B9870: to_8_3 /home/jra/src/samba/git/master/source3/smbd/mangle_hash.c:587
==29096==    by 0x5B9E05: hash_name_to_8_3 /home/jra/src/samba/git/master/source3/smbd/mangle_hash.c:676
==29096==    by 0x5B82F3: name_to_8_3 /home/jra/src/samba/git/master/source3/smbd/mangle.c:146
==29096==    by 0x5303B4: call_trans2findfirst /home/jra/src/samba/git/master/source3/smbd/trans2.c:2507
==29096==    by 0x547622: handle_trans2 /home/jra/src/samba/git/master/source3/smbd/trans2.c:8163
==29096==    by 0x548720: reply_trans2 /home/jra/src/samba/git/master/source3/smbd/trans2.c:8449
==29096==    by 0x58167F: switch_message /home/jra/src/samba/git/master/source3/smbd/process.c:1399
==29096==    by 0x5817DD: construct_reply /home/jra/src/samba/git/master/source3/smbd/process.c:1430
==29096==    by 0x581B4F: process_smb /home/jra/src/samba/git/master/source3/smbd/process.c:1503
==29096==    by 0x58326A: smbd_server_connection_read_handler /home/jra/src/samba/git/master/source3/smbd/process.c:2111
==29096==    by 0x5832C7: smbd_server_connection_handler /home/jra/src/samba/git/master/source3/smbd/process.c:2126
==29096==    by 0x8E5A59: run_events /home/jra/src/samba/git/master/source3/lib/events.c:148

This is due to the charset array allocated in init_chartest() being allocated by MALLOC, but only some elements of it being set after allocation. Fix is to memset to zero after allocation. Patch follows.

Jeremy.
Comment 1 Jeremy Allison 2010-02-18 14:27:08 UTC
Created attachment 5386 [details]
git-am fix for 3.5.0rc3
Comment 2 Jeremy Allison 2010-02-18 14:28:04 UTC
Created attachment 5387 [details]
git-am fix for 3.4.6.
Comment 3 Jeremy Allison 2010-02-18 14:29:14 UTC
Created attachment 5388 [details]
git-am fix for 3.3.1..

Volker, please re-assign to Karolin for inclusion once you've reviewed.

Thanks !

Jeremy.
Comment 4 Karolin Seeger 2010-02-19 02:21:40 UTC
Pushed to all branches.
Closing out bug report.

Thanks!