Additional bug in _POSIX_Keys_Run_destructors()?

Joel Sherrill joel.sherrill at oarcorp.com
Fri Nov 2 13:55:33 UTC 2007


Phil Torre wrote:
> Hi Joel,
>
> Last week you clued me in to a patch that I was missing in my outdated
> 4.6.0-derived source tree.  (Specifically, pthread_getspecific() was
> indexing into the key values with key->Values[class] instead of
> key->Values[api].)  I applied that patch and things are working well.
>
> I started looking around, and I see what may be the same bug in another
> place; this time it's _POSIX_Keys_Run_destructors().  That function is
> also indexing into the Values array using class rather than API.  I 
> looked at your current CVS version and it's doing the same thing.
> Is this a bug that got missed when the previous one was patched?
>
>   
Looks like it to me.  Attached is a patch.  Does it look OK to you?

FWIW keys have an issue when the number of threads is
configured as unlimited.  A while back, I suggested going to
a hash map for thread keys but never got anywhere with it.

--joel
> Thanks,
> -Phil
>
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: key.diff
Type: text/x-patch
Size: 1464 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20071102/d1a8b338/attachment.bin>


More information about the users mailing list