<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 40: Unsupported Pointer Functions, Snow Leopard</title><link>https://sourceforge.net/p/regexkit/bugs/40/</link><description>Recent changes to 40: Unsupported Pointer Functions, Snow Leopard</description><atom:link href="https://sourceforge.net/p/regexkit/bugs/40/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 12 Oct 2009 04:16:14 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/regexkit/bugs/40/feed.rss" rel="self" type="application/rss+xml"/><item><title>Unsupported Pointer Functions, Snow Leopard</title><link>https://sourceforge.net/p/regexkit/bugs/40/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Below is a discussion on the Cocoa mailing list about the messages (and sometimes exceptions!!!) that RegexKit throws out on Snow Leopard.&lt;/p&gt;
&lt;p&gt;Is there anyone alive around here to make a new release? I've tried building the code and there are some other errors and rather worrying looking warnings, I'd prefer it if someone familiar with the situation were to make a new release.&lt;/p&gt;
&lt;p&gt;On 10.10.2009, at 13:56, Chris Idou wrote:&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; Below is the RegexKit code that causes the Snow Leopard error. After reading the doco, I don't feel very enlightened about what the unsupported configuration is, or what the solution might be. Can anyone give me a clue?&lt;/p&gt;
&lt;p&gt;Sure: replace NSPointerFunctionsIntegerPersonality by NSPointerFunctionsIntegerPersonality | NSPointerFunctionsOpaqueMemory.&lt;/p&gt;
&lt;p&gt;Best&lt;br /&gt;
Kai&lt;/p&gt;
&lt;p&gt;&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; + (void)load&lt;br /&gt;
&amp;gt; {&lt;br /&gt;
&amp;gt;  RKAtomicMemoryBarrier(); // Extra cautious&lt;br /&gt;
&amp;gt;  if(RKCacheLoadInitialized== 1) { return; }&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;  if(RKAtomicCompareAndSwapInt(0, 1, &amp;amp;RKCacheLoadInitialized)) {&lt;br /&gt;
&amp;gt;    if((cacheMapKeyCallBacks= dlsym(RTLD_DEFAULT, "NSIntegerMapKeyCallBacks")) == NULL) { cacheMapKeyCallBacks= dlsym(RTLD_DEFAULT, "NSIntMapKeyCallBacks"); }&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; #ifdef ENABLE_MACOSX_GARBAGE_COLLECTION&lt;br /&gt;
&amp;gt;    id garbageCollector = objc_getClass("NSGarbageCollector");&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;    if(garbageCollector != NULL) {&lt;br /&gt;
&amp;gt;      if([garbageCollector defaultCollector] != NULL) {&lt;br /&gt;
&amp;gt;        id pointerFunctions = objc_getClass("NSPointerFunctions");&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions = [pointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsIntegerPersonality];&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.acquireFunction    = intPointerFunctionsAcquire;&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.descriptionFunction = intPointerFunctionsDescription;&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.hashFunction        = intPointerFunctionsHash;&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.isEqualFunction    = intPointerFunctionsIsEqual;&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.relinquishFunction  = intPointerFunctionsRelinquish;&lt;br /&gt;
&amp;gt;        RKCacheIntegerKeyPointerFunctions.sizeFunction        = intPointerFunctionsSize;&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;        RKCacheObjectValuePointerFunctions = [pointerFunctions pointerFunctionsWithOptions:(NSPointerFunctionsZeroingWeakMemory| NSPointerFunctionsObjectPersonality)];&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;        [[garbageCollector defaultCollector] disableCollectorForPointer:RKCacheIntegerKeyPointerFunctions];&lt;br /&gt;
&amp;gt;        [[garbageCollector defaultCollector] disableCollectorForPointer:RKCacheObjectValuePointerFunctions];&lt;br /&gt;
&amp;gt;      }&lt;br /&gt;
&amp;gt;    }&lt;br /&gt;
&amp;gt; #endif // ENABLE_MACOSX_GARBAGE_COLLECTION&lt;br /&gt;
&amp;gt;  }&lt;br /&gt;
&amp;gt; }&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; ________________________________&lt;br /&gt;
&amp;gt; From: Bill Bumgarner &amp;lt;bbum@mac.com&amp;gt;&lt;br /&gt;
&amp;gt; To: Chris Idou &amp;lt;idou747@yahoo.com&amp;gt;&lt;br /&gt;
&amp;gt; Cc: cocoa-dev@lists.apple.com&lt;br /&gt;
&amp;gt; Sent: Thu, 24 September, 2009 12:36:04 PM&lt;br /&gt;
&amp;gt; Subject: Re: Snow Leopard: unsupported PointerFunctions configuration was requested&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; On Sep 23, 2009, at 7:09 PM, Chris Idou wrote:&lt;br /&gt;
&amp;gt; Very early in application startup, even before main() is called, I get the following error:&lt;br /&gt;
&amp;gt;&amp;gt; &lt;br /&gt;
&amp;gt;&amp;gt; 2009-09-24 12:07:11.462 MyApp[5534:a0f] *** An unsupported PointerFunctions configuration was requested, probably for use by NSMapTable, NSHashTable, or NSPointerArray.  The requested configuration fails due to integer personality not using opaque memory&lt;br /&gt;
&amp;gt;&amp;gt; &lt;br /&gt;
&amp;gt;&amp;gt; It happens twice on startup, and below are the stack traces when it happens:&lt;br /&gt;
&amp;gt;&amp;gt; &lt;br /&gt;
&amp;gt;&amp;gt; What does it all mean?&lt;br /&gt;
&amp;gt;&amp;gt; &lt;br /&gt;
&amp;gt;&amp;gt; &lt;br /&gt;
&amp;gt;&amp;gt; #0    0x7fff84b342f7 in NSLog&lt;br /&gt;
&amp;gt;&amp;gt; #1    0x7fff84ac84d1 in +[NSConcretePointerFunctions initializeSlice:withOptions:]&lt;br /&gt;
&amp;gt;&amp;gt; #2    0x7fff84aea796 in -[NSConcretePointerFunctions initWithOptions:]&lt;br /&gt;
&amp;gt;&amp;gt; #3    0x7fff84aea74d in +[NSPointerFunctions pointerFunctionsWithOptions:]&lt;br /&gt;
&amp;gt;&amp;gt; #4    0x10004b633 in +[RKCache load]&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; One change to the NSPointerFunction based collection classes (which support a number of things that NSArray &amp;amp; the like do not) between Leopard and Snow Leopard was to tighten up the validation of the pointer function validation such that a handful of non-sensical configurations are detected that weren't before.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; I.e. RKCache is trying to create a set of pointer functions that doesn't make sense (and for whose behavior is undefined).&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; As someone else pointed out, RK is most likely RegexKit and, thus, the source is available and can be fixed.  Given the relatively common use of RK*, please provide a patch to the author so it can be fixed upstream.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; b.bum&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt;      __________________________________________________________________________________&lt;br /&gt;
&amp;gt; Get more done like never before with Yahoo!7 Mail.&lt;br /&gt;
&amp;gt; Learn more: &lt;a href="http://au.overview.mail.yahoo.com/" rel="nofollow"&gt;http://au.overview.mail.yahoo.com/&lt;/a&gt;&lt;br /&gt;
&amp;gt; _______________________________________________&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; Please do not post admin requests or moderator comments to the list.&lt;br /&gt;
&amp;gt; Contact the moderators at cocoa-dev-admins(at)lists.apple.com&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; Help/Unsubscribe/Update your Subscription:&lt;br /&gt;
&amp;gt; &lt;a href="http://lists.apple.com/mailman/options/cocoa-dev/lists%40kai-bruening.de" rel="nofollow"&gt;http://lists.apple.com/mailman/options/cocoa-dev/lists%40kai-bruening.de&lt;/a&gt;&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; This email sent to lists@kai-bruening.de&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 12 Oct 2009 04:16:14 -0000</pubDate><guid>https://sourceforge.netbbcd562603286d78d51b37f899a1148512296476</guid></item></channel></rss>