This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] getauxval: fix crash on systems without HAVE_AUX_VECTOR
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, bug-hurd at gnu dot org
- Date: Mon, 4 Apr 2016 12:37:55 -0700 (PDT)
- Subject: Re: [PATCH] getauxval: fix crash on systems without HAVE_AUX_VECTOR
- Authentication-results: sourceware.org; auth=none
- References: <20160402105716 dot GA10998 at var dot jdll dot illyse dot net> <20160402173042 dot GT6588 at vapier dot lan>
> On 02 Apr 2016 12:57, Samuel Thibault wrote:
> > Systems without HAVE_AUX_VECTOR have GLRO(dl_auxv) == NULL, and
> > getauxval would thus crash.
>
> assuming this is for GNU/hurd
Yes.
> should this just be under HAVE_AUX_VECTOR ? seems like we shouldn't
> even bother defining/exporting dl_auxv at all if it's disabled. then
> we wouldn't run into more latent problems like this at run time -- it
> would be a build failure.
Agreed.
> in looking at other uses of dl_auxv, why isn't _dl_sysdep_start an
> issue too ? rtld.c:_dl_start_final always calls that, and that func
> always walks GLRO(dl_auxv).
You are looking at elf/dl-sysdep.c, not sysdeps/mach/hurd/dl-sysdep.c.