Bug 363740 - Possible data race in vgPlain_amd64_linux_REDIR_FOR_vgettimeofday
Summary: Possible data race in vgPlain_amd64_linux_REDIR_FOR_vgettimeofday
Status: RESOLVED NOT A BUG
Alias: None
Product: valgrind
Classification: Developer tools
Component: helgrind (show other bugs)
Version: 3.11.0
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 13:39 UTC by Daniel
Modified: 2018-04-16 07:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.