master now at 2.070, merge-2.071 branch created
Rainer Schuetze via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Mon May 2 00:08:13 PDT 2016
On 01.05.2016 23:54, Joakim wrote:
> On Sunday, 1 May 2016 at 08:01:42 UTC, Rainer Schuetze wrote:
>>
>>> I just noticed that the std.datetime problem disappears when disabling
>>> the garbage collection. My guess is that TLS is not scanned correctly.
>>>
>>
>> I think I have figured this out: TLS of the main thread is scanned
>> misaligned if the size of TLS is not a multiple of the pointer size:
>> https://github.com/ldc-developers/druntime/commit/740c1bb86b36725cf2d671a7ac8f77de692899be
>>
>
> Yeah, that fixes the phobos tests for me, guess it should be uncommented
> in getTLSRange below,
Please note that the versioned code in getTLSRange aligns to
2*size_t.sizeof which seems to relate to something else. Actually I
added the alignment there first, but it triggered assertions elsewhere
which would have to be adjusted, too. Aligning the stored size was the
smallest change.
> still two unrelated failures in the dmd test
> suite. I don't know how using druntime from the beta1 binary release
> didn't show this issue though.
It very much depends on the size and alignment of the last element in
the TLS section. The order of symbol placement probably depends on order
of object files in library, order of command line arguments, symbol
dependencies and more, so pretty hard to predict.
More information about the digitalmars-d-ldc
mailing list