This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] resolver fix


>>>>> Jakub Jelinek writes:

 > Hi!
 > This patch fixes resolver segfaults when linked with -lpthread.
 > The issue is that the new resolver defines
 > #define _res (*__res_state())
 > so when pthread.c sets the initial resp pointer to &_res, it sets it to
 > NULL.
 > Also, __pthread_initialize_minimal was called from within HAVE_DWARF2_*
 > defines which is very wrong - if the system does not have DWARF2 eh, then it
 > looses because pthread_initialize_minimal will be never called.
 > And last, one minor optimization, like errno_location, __res_state is a good
 > candidate for __attribute__((const)) IMHO, because it will not change during
 > lifetime of any thread.

Thanks for the patch, Jakub.  I've applied it with some indentation
changes for resolv.h.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]