This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about tst-stack4


On Thu, 2017-08-17 at 19:29 +0100, Szabolcs Nagy wrote:
> On 16/08/17 14:08, Adhemerval Zanella wrote:
> > 
> > On 15/08/2017 18:03, Steve Ellcey wrote:
> > > 
> > > Currently, with top-of-tree sources this test fails for me on
> > > aarch64 with the new ILP32 ABI but passes with the LP64 ABI.
> > > The failure I see in nptl/tst-stack4.out is:
> > > 
> > > Didn't expect signal from child: got `Segmentation fault'
> > > 
> aarch64 dl-tlsdesc.S dynamic tlsdesc resolver has:
> 
> 	ldr	PTR_REG (0), [x0] /* Load val member of DTV
> entry.  */
> 	cmp	x0, #TLS_DTV_UNALLOCATED
> 	b.eq	2f
> 
> can it be that the cmp against -1 goes wrong because
> x0 is 32bit 0xffffffff ? then this would be returned
> as the tls address here instead of initializing the
> dtv entry.. do you see segfault at tls access with
> address 0xffffffff?.

I don't think that is where it is dying.  If I run it by hand I see:

% ./tst-stack4
tst-stack4: tst-stack4.c:69: dso_process: Assertion `handle[dso]' failed.
Didn't expect signal from child: got `Aborted'

So it looks like dlopen is failing.  I added a dlerror call to
tst-stack4.c and now I see:

% ./tst-stack4
tst-stack4mod-0-0.so: cannot open shared object file: No such file or directory
tst-stack4: tst-stack4.c:71: dso_process: Assertion `handle[dso]' failed.
Didn't expect signal from child: got `Aborted'

I do have a 'tst-stack4mod-0-0.so' in the object directory:

% ll tst-stack4mod-0-0.so
-rwxr-xr-x 1 sellcey ubuntu 9104 Aug 17 13:42 tst-stack4mod-0-0.so

It looks like the right format:

% file tst-stack4mod-0-0.so
tst-stack4mod-0-0.so: ELF 32-bit LSB shared object, ARM aarch64,
version 1 (SYSV), dynamically linked, for GNU/Linux 3.0.0, not stripped

If I run tst-stack4 enough, sometimes the message says it can't load
'tst-stack4mod-1-0.so' instead of 'tst-stack4mod-0-0.so.

Steve Ellcey
sellcey@cavium.com


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