iOS progress

Jacob Carlborg via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Feb 17 01:08:02 PST 2015


On 2015-02-16 22:38, Dan Olson wrote:

> I think directly using tlv_get_addr may lead to weird errors if thread
> local descriptors have not been initialized by runtime. With
> __tls_get_addr there is a check that descriptor is initialized, and if I
> get around to changing llvm to call thunk directly, then uninitialized
> descriptor will have thunk set to _tlv_bootstrap and code will cleanly
> abort.

I see that you used a constructor to initialize everything. Won't that 
be enough to know that tlv_get_addr is correctly initialized? No D code 
will be able to run before that, as far as I understand.

On OS X tlv_initializer will be called by _dyld_initializer which is 
called by libSystem, if I understand the source code of dyld correctly. 
This doesn't happen on iOS?

-- 
/Jacob Carlborg


More information about the digitalmars-d-ldc mailing list