- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The boost libraries use the following inline assembly:
[bash] inline bool interlocked_bit_test_and_set(long* x,long bit) { __asm { mov eax,bit; mov edx,x; lock bts [edx],eax; setc al; }; } inline bool interlocked_bit_test_and_reset(long* x,long bit) { __asm { mov eax,bit; mov edx,x; lock btr [edx],eax; setc al; }; } [/bash]
When /debug:parallel is set, the setc al; is immediately followed by mov "eax, esp", trashing the intended return value and causing an attempt to lock the mutex to wait forever (unless the lowest 8 bits of esp happen to be 0 of course).
I have reported this as a bug against boost (https://svn.boost.org/trac/boost/ticket/6931) along with a simple fix (move al into a temporary bool and return the temporary). However, this probably isn't the only instance of such a construct out there... so IMO, the extra code that /debug:parallel inserts should not trash any registers.
Orin.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's the reason for building with /debug:parallel? This option is for creating parallel debug checks used by the Intel IDB Debugger to detect data sharing event in OpenMP* parallelized code.
Regards, Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my reply in the other thread. I am actually using OpenMP.
Orin.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page