NetBSD-Bugs archive

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

Re: port-macppc/54953: 5.0 binaries on 9.0_RC2 macppc dumps core in jemalloc(3)



The following reply was made to PR port-macppc/54953; it has been noted by GNATS.

From: Jason Thorpe <thorpej%me.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: port-macppc-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-macppc/54953: 5.0 binaries on 9.0_RC2 macppc dumps core in
 jemalloc(3)
Date: Tue, 11 Feb 2020 14:08:57 -0800

 > On Feb 11, 2020, at 1:55 PM, Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
 > 
 > 	/*
 > 	 * Initialize the Small Data Area registers.
 > 	 * _SDA_BASE is defined in the SVR4 ABI for PPC.
 > 	 * _SDA2_BASE is defined in the E[mbedded] ABI for PPC.
 > 	 */
 > 	__asm(  "lis %r13,_SDA_BASE_@ha;"
 > 		"addi %r13,%r13,_SDA_BASE_@l;"
 > 		"lis %r2,_SDA2_BASE_@ha;"
 > 		"addi %r2,%r2,_SDA2_BASE_@l" );
 > 
 > But now we use %r2 for TLS!  So malloc() works fine the first few
 > times that it's called from the libc init.  Then the old binary entry
 > point is called (old crt0) and it overwrites TLS magic in %r2 with
 > _SDA2_BASE_.  Next time malloc() is called and checks its TLS stuff,
 > the %r2 contains wrong value and pop goes the weasel.
 
 Um, are we no longer adhering to the PPC SVR4 ABI??
 
 -- thorpej
 


Home | Main Index | Thread Index | Old Index