[phobos] std.parallelism's unit tests randomly hang on win32
Sean Kelly
sean at invisibleduck.org
Sun May 1 17:30:03 PDT 2011
Is core.atomic not saving and restoring a register it should?
Sent from my iPhone
On May 1, 2011, at 12:44 PM, David Simcha <dsimcha at gmail.com> 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.
>
> Therefore, somehow the low order bits of pointers are getting corrupted with the value of TaskStatus.done in several places. This is strong evidence that the underlying issue is a codegen bug or a bug in the ASM for the atomic ops, not a concurrency bug.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list