[PATCH] Segmented stack support ARM iOS

Tim Northover t.p.northover at gmail.com
Thu May 8 02:22:55 PDT 2014

Hi Valerii,

> To be precise, it uses Apple-specific implementation of _pthread_{get,set}specific_direct taken from http://www.opensource.apple.com/source/Libc/Libc-825.40.1/pthreads/pthread_machdep.h and uses static key #149.  While it is not in Apple-reserved range (0..119 as of libc 825.40.1), it still unclear if it is smaller than total count of reserved slots.

We've checked with some people in here, and both the entire static range and the implementation of the pthread_getspecific functions themselves are reserved. User code shouldn't be relying on either. Since they're liable to change at any point, this would probably block any program that made those assumptions from the App Store.

I still personally think the only portable solution is a generic callback. If the performance impact of that is too great, we should be trying to come up with a solution that doesn't involve importing every platform under the sun's OS-specific code into FrameLowering (an already very sensitive area of the ARM target: I think most of the bugs I've personally introduced to LLVM have been there).



- {F57015, layout=link}


More information about the llvm-commits mailing list