Konstantin,

Thank you for quick reply.

Here is review request to revert field change:
https://reviews.freebsd.org/D11738

Thanks!



On Wed, Jul 26, 2017 at 6:23 PM, Konstantin Belousov <kostik...@gmail.com>
wrote:

> On Wed, Jul 26, 2017 at 06:09:00PM +0300, Michael Zhilin wrote:
> > Hi Eric, Konstantin,
> >
> > This commit breaks libthread_db a bit, particular change is:
> > -struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX];
> > +static struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX];
> >
> > In libthread_db there is check if _thread_keytable is found in symbols of
> > debugged process:
> > https://svnweb.freebsd.org/base/head/lib/libthread_db/
> libthr_db.c?revision=241720&view=markup#l148
> >
> > LOOKUP_SYM(ph, "_thread_keytable", &ta->thread_keytable_addr);
> >
> > If symbol is not found, pt_ta_new returns "TD_NOLIBTHREAD", even if
> process
> > uses libthr.
> > It impacts sysutils/pstack port, it doesn't work for multithreaded
> > processes anymore.
> >
> > Eric, Konstantin,
> > Could you please advise what is best way to fix it:
> >
> >    - rollback change of "_thread_keytable" (it looks easy)
> >    - or remove "_thread_keytable" from libthread_db
> >
> > ?
>
> The td_ta_tsd_iter() API implementation for libthr depends on the ability
> to lookup the symbol.  I think that the change should be reverted, it is
> easiest solution.
>
> Perhaps a comment should be added noting that the symbol is used by
> libthread_db so that the mistake is not repeated.
>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to