Implementing native TLS on OS X in DMD

kink via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Jan 12 02:29:12 PST 2016


On Tuesday, 12 January 2016 at 05:44:56 UTC, Dan Olson wrote:
> kinke <noone at nowhere.com> writes:
>
>> On Saturday, 9 January 2016 at 20:07:34 UTC, Dan Olson wrote:
>>> Just re-reading and it looks like alignments in your example 
>>> are too big for a 4-byte type, assuming var is an int.  
>>> .align only needs to be 2 here.
>>
>> This is probably due to 
>> https://github.com/kinke/ldc/commit/a39997d326f0d3da353d8b9f27ffd559e6fcc5d7.
>
> I haven't carefully read the commit yet.  Is the extra 
> alignment intended for all vars declarations?

For all globals, yes. There's a std.conv unittest casting a 
global (I don't remember the original type) to an object (class) 
reference iirc, leading to an error or crash if the chunk isn't 
aligned. I just assumed DMD assumes such an alignment for 
globals...


More information about the digitalmars-d-ldc mailing list