[phobos] std.parallelism's unit tests randomly hang on win32

David Simcha dsimcha at gmail.com
Tue May 3 05:43:10 PDT 2011


On 5/3/2011 1:32 AM, Walter Bright wrote:
>
>
> On 5/1/2011 12:44 PM, David Simcha wrote:
>> Update:  The segfaults on Linux64 are also being caused by the low 
>> order bit corruption bug.  Whenever I look at the chain of pointer 
>> dereferences in GDB by viewing the registers and disassembly on 
>> crash, the segfault is always caused by dereferencing a pointer to 
>> some memory address that's clearly illegal.  (On x64 user mode 
>> addresses can't have their high order bits set, and the addresses 
>> being dereferenced often do.  See 
>> http://en.wikipedia.org/wiki/X64#Virtual_address_space_details .)  
>> This wild pointer is obtained by dereferencing another pointer whose 
>> low order bits are always equal to TaskStatus.done.  For example, if 
>> TaskStatus.done == 2, the pointer might be something like 0x0000ABCD 
>> EF123402.  If TaskStatus.done == 1, it will be something like 
>> 0x0000ABCD EF123401.
>>
>
> Add asserts on that pointer value going out of range, and keep working 
> backwards until the point where the value goes wrong is discovered.

Been trying to do that, but I think there are multiple places where this 
is happening and the asserts are affecting codegen or timings just 
enough to prevent some.  Similarly, putting a try/catch block in some 
seemingly unrelated place prevents certain manifestations on Windows.


More information about the phobos mailing list