On Fri, Jul 24, 2009 at 03:25:02PM -0700, M .Baz wrote:
> Hello Bart,
> 
> The only option to enter in an infinite loop is stsd->tsd_nalloc = 0.
> Is it possible ? no check of this value is done before the sentence "for..."
> 
>  "
>     296       nkeys = ((stsd = self->ul_stsd) != NULL)? stsd->tsd_nalloc : 8;
>     297       for (; key >= nkeys; nkeys <<= 1)
>     298               continue;
> "
> -- 

But this is the only function which sets tsd_nalloc, and the original value is
8.  Attach to your program with mdb, and do:

% mdb -p pid
Loading modules: [ ld.so.1 libc.so.1 ]
> ::walk ulwps | ::print ulwp_t ul_stsd[]

That will print out the thread specific data structures for every thread
in the program.  See what the tsd_nalloc values are; they should all be
powers-of-2 >= 8.

Cheers,
- jonathan

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to