[cfe-dev] GNU runtime non-fragile ABI and cleanup

Fariborz Jahanian fjahanian at apple.com
Mon Aug 31 09:57:53 PDT 2009


Thanks for pointing this out. I will pose this question to our  
internal folks.

- Fariborz

On Aug 31, 2009, at 9:45 AM, Jean-Daniel Dupas wrote:

>
> Le 31 août 2009 à 18:32, Fariborz Jahanian a écrit :
>
>>
>> On Aug 30, 2009, at 5:44 PM, David Chisnall wrote:
>>
>>> On 30 Aug 2009, at 18:46, Fariborz Jahanian wrote:
>>>
>>>> Did you want this in your patch?
>>>
>>> No, this happened when I ran the test suite; there appears to be a
>>>
>> Currently, there is no plan to support legacy variations of objc's
>> constant strings for NeXT runtime in clang (no  -fno-constant-
>> cfstrings  or -fconstant-string-class=class-name). Please add the
>> FIXME with above comment if you don't have plan to change the above.
>
> Isn't the -fno-constant-cfstrings flag required to build unloadable  
> bundle ? Is there some change that made it legacy ?
>
> http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFBundles/AccessingaBundlesContents/AccessingaBundlesContents.html
>
> From the Unloading Bundle section:
>
> "When you compile a bundle with a minimum deployment target of Mac  
> OS X 10.2 (or later), the compiler automatically switches to  
> generating strings that are truly constant in response  
> toCFSTR("..."). The compiler also generates these constant strings  
> if you compile with the flag -fconstant-cfstrings. Constant strings  
> have many benefits and should be used when possible, however if you  
> reference constant strings after the executable containing them is  
> unloaded, the references will be invalid and will cause a crash.  
> This might happen even if the strings have been retained, for  
> example, as a result of being put in data structures, retained  
> directly, and, in some cases, even copied. Rather than trying to  
> make sure all such references are cleaned up at unload time (and  
> some references might be created within the libraries, making them  
> hard to track), it is best to compile unloadable bundles with the  
> flag -fno-constant-cfstrings."
>
>
>





More information about the cfe-dev mailing list