Re: [Valgrind-users] Atos can find line of an address, but valgrind doesn't print it.

2013-01-23 Thread Julian Seward
On 01/21/2013 01:38 PM, Nick Overdijk wrote: Ah of course. I didn't do that, I ran it myself manually on stage1. such as: dsymutil stage1 valgrind stage1 That's because the call to valgrind is a bit hidden in some scripts that are also used on linux. Should my way work? I think it should;

Re: [Valgrind-users] Qt5 support in helgrind

2013-01-23 Thread Julian Seward
==9070== Lock at 0xD81F6F8 was first observed ==9070==at 0x4C3077F: QMutex::QMutex(QMutex::RecursionMode) (hg_intercepts.c:2186) ==9070==by 0x4C307A4: QMutex::QMutex(QMutex::RecursionMode) (hg_intercepts.c:2192) ==9070==by 0x585A9CE: QPostEventList::QPostEventList()

Re: [Valgrind-users] Qt5 support in helgrind

2013-01-23 Thread David Faure
On Wednesday 23 January 2013 12:24:30 Julian Seward wrote: ==9070== Lock at 0xD81F6F8 was first observed ==9070==at 0x4C3077F: QMutex::QMutex(QMutex::RecursionMode) (hg_intercepts.c:2186) ==9070==by 0x4C307A4: QMutex::QMutex(QMutex::RecursionMode) (hg_intercepts.c:2192) ==9070==

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread David Faure
On Monday 27 August 2012 15:25:14 Marc Mutz wrote: If atomic loads and stores on x86 are implemented with a volatile cast, then the compiler can't reorder stuff around them, either. Not more than with a std::atomic, at least. QAtomic does that. For load-relaxed, Thiago thinks that a normal

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread Julian Seward
On 01/23/2013 03:08 PM, David Faure wrote: I was talking to Julian about this again today, and he pointed me to this writeup: http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming We're looking at how to silence valgrind about Qt atomic

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread Dave Goodell
On Jan 23, 2013, at 8:08 AM CST, David Faure wrote: On Monday 27 August 2012 15:25:14 Marc Mutz wrote: If atomic loads and stores on x86 are implemented with a volatile cast, then the compiler can't reorder stuff around them, either. Not more than with a std::atomic, at least. QAtomic does

Re: [Valgrind-users] Atos can find line of an address, but valgrind doesn't print it.

2013-01-23 Thread Dave Goodell
On Jan 20, 2013, at 3:50 PM CST, Nick Overdijk wrote: I have a nice stacktrace from some memory error in valgrind, and it fails to print the source file + line number somewhere. Here's the trace: ==63113== Conditional jump or move depends on uninitialised value(s) […] ==63113==

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread Julian Seward
On 01/23/2013 04:22 PM, Dave Goodell wrote: If you don't want to write inline assembly, this might be your best bet. But on TSO systems like x86, you only need a compiler barrier. In x86 inline assembly syntax, this looks like: __asm__ __volatile__ ( ::: memory ) This prevents GCC (and

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread Dave Goodell
On Jan 23, 2013, at 9:55 AM CST, Thiago Macieira wrote: On quarta-feira, 23 de janeiro de 2013 09.22.49, Dave Goodell wrote: If you don't want to write inline assembly, this might be your best bet. But on TSO systems like x86, you only need a compiler barrier. In x86 inline assembly

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread Dave Goodell
On Jan 23, 2013, at 10:33 AM CST, Dave Goodell wrote: Julian/Bart/etc. may have more to add here. I remember having trouble with annotating load-acquire/store-release in the past. Here's the (only partially helpful) thread on the topic: Sorry for the extra email. I accidentally whacked