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
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to