[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glibc 2.24 testsuite issues on hppa



On 2016-08-08, at 5:50 AM, Aurelien Jarno wrote:

> Looking more in details, there are small differences in the two
> implementations, but the only one that changes the behaviour is due to
> this missing hunk in the upstream version:
> 
> --- a/nptl/allocatestack.c
> +++ b/nptl/allocatestack.c
> @@ -683,9 +692,13 @@
> 			prot) != 0)
> 	    goto mprot_error;
> #elif _STACK_GROWS_UP
> -	  if (mprotect ((char *) pd - pd->guardsize,
> -			pd->guardsize - guardsize, prot) != 0)
> -	    goto mprot_error;
> +	  char *new_guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
> +	  char *old_guard = (char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1);
> +	  /* The guard size difference might be > 0, but once rounded
> +	     to the nearest page the size difference might be zero.  */
> +	  if (old_guard - new_guard > 0)
> +	    if (mprotect (old_guard, new_guard - old_guard, prot) != 0)
> +	      goto mprot_error;
> #endif
> 
> 	  pd->guardsize = guardsize;
> 
> It therefore looks like this should also be upstreamed. We can add it
> back in the debian version in the meantime.

Thanks for comparing patches.

I tried to confirm the above change fixes the test regression using upstream source but it seems binutils 2.27-2 is broken:

[...]
a - elf/dl-tsd.os
hppa-linux-gnu-gcc-6   -nostdlib -nostartfiles -r -o /home/dave/gnu/glibc/objdir/elf/librtld.map.o '-Wl,-(' /home/dave/gnu/glibc/objdir/elf/dl-allobjs.os /home/dave/gnu/glibc/objdir/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/dave/gnu/glibc/objdir/elf/librtld.mapT
/usr/bin/ld:/home/dave/gnu/glibc/objdir/libc_pic.a: file format not recognized; treating as linker script
/usr/bin/ld:/home/dave/gnu/glibc/objdir/libc_pic.a:1: syntax error
collect2: error: ld returned 1 exit status
Makefile:349: recipe for target '/home/dave/gnu/glibc/objdir/elf/librtld.map' failed
make[2]: *** [/home/dave/gnu/glibc/objdir/elf/librtld.map] Error 1

The error doesn't occur with 2.26.1.

Dave
--
John David Anglin	dave.anglin@bell.net




Reply to: