Bug 363740

Summary: Possible data race in vgPlain_amd64_linux_REDIR_FOR_vgettimeofday
Product: [Developer tools] valgrind Reporter: Daniel <bugzilla>
Component: helgrindAssignee: Daniel <bugzilla>
Status: RESOLVED NOT A BUG    
Severity: normal CC: bart.vanassche+kde
Priority: NOR    
Version: 3.11.0   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel 2016-05-31 13:39:30 UTC
I checked that gettimeofday is thread-safe. However when I tried to analyze my program with helgrind, I got following report. Please fix this or suppress it by default.

==23482== Possible data race during write of size 8 at 0x9218A0 by thread #1
==23482== Locks held: none
==23482==    at 0x3803BCCC: vgPlain_amd64_linux_REDIR_FOR_vgettimeofday (m_trampoline.S:178)
==23482==    by 0x5FFD7A9: gettimeofday (in /lib64/libc-2.12.so)
==23482==    [remaining part of stack was here]
==23482== 
==23482== This conflicts with a previous write of size 8 by thread #2
==23482== Locks held: 1, at address 0x912D80
==23482==    at 0x3803BCCC: vgPlain_amd64_linux_REDIR_FOR_vgettimeofday (m_trampoline.S:178)
==23482==    by 0x5FFD7A9: gettimeofday (in /lib64/libc-2.12.so)
==23482==    [remaining part of stack was here]
==23482==  Address 0x9218a0 is 0 bytes inside data symbol "func"
Comment 1 Bart Van Assche 2016-05-31 15:14:25 UTC
Why do you think this is a Valgrind issue and not an issue in your application?
Comment 2 Daniel 2018-04-16 07:48:43 UTC
This finally turned out to be a bug on my side. I am closing this as invalid.