NetBSD-Bugs archive

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

Re: port-hppa/56118: sporadic app crashes in HPPA -current



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

From: Christian Groessler <chris%groessler.org@localhost>
To: gnats-bugs%netbsd.org@localhost, port-hppa-maintainer%netbsd.org@localhost,
        gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-hppa/56118: sporadic app crashes in HPPA -current
Date: Tue, 27 Jul 2021 14:39:43 +0200

 I've tried a variation of the diff, since it didn't work for me (missing 
 closing bracket):
 
 Index: hppa_reloc.c
 ===================================================================
 RCS file: 
 /nfs/swamp/zeug/netbsd-rsync/main/src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c,v
 retrieving revision 1.47
 diff -u -r1.47 hppa_reloc.c
 --- hppa_reloc.c        16 May 2020 16:43:00 -0000      1.47
 +++ hppa_reloc.c        27 Jul 2021 12:37:23 -0000
 @@ -52,6 +52,7 @@
   caddr_t _rtld_bind(const Obj_Entry *, const Elf_Addr);
   void _rtld_bind_start(void);
   void __rtld_setup_hppa_pltgot(const Obj_Entry *, Elf_Addr *);
 +void _rtld_set_dp(Elf_Addr *);
 
   /*
    * It is possible for the compiler to emit relocations for unaligned data.
 @@ -381,6 +382,12 @@
   {
          Elf_Word *got = obj->pltgot;
 
 +
 +       if (obj->mainprog) {
 +               hdbg(("setting DP to %p", obj->pltgot));
 +               _rtld_set_dp(obj->pltgot);
 +       }
 +
          assert(got[-2] == PLT_STUB_MAGIC1);
          assert(got[-1] == PLT_STUB_MAGIC2);
 
 Index: rtld_start.S
 ===================================================================
 RCS file: 
 /nfs/swamp/zeug/netbsd-rsync/main/src/libexec/ld.elf_so/arch/hppa/rtld_start.S,v
 retrieving revision 1.13
 diff -u -r1.13 rtld_start.S
 --- rtld_start.S        10 May 2020 06:42:38 -0000      1.13
 +++ rtld_start.S        27 Jul 2021 12:37:23 -0000
 @@ -231,3 +231,9 @@
          bv      %r0(%r21)
          nop
   EXIT(_rtld_bind_start)
 +
 +
 +LEAF_ENTRY_NOPROFILE(_rtld_set_dp)
 +       bv      %r0(%rp)
 +        copy   %arg0, %dp
 +EXIT(_rtld_set_dp)
 
 
 
 But now it's worse:
 
 hppa# cd /var/tmp/
 hppa# ls
 base.tgz         debug.tgz        games.tgz        kern-GENERIC.tgz 
 misc.tgz         rescue.tgz       text.tgz         xbase.tgz 
 xdebug.tgz       xfont.tgz
 comp.tgz         etc.tgz          kern-CPGHPPA.tgz man.tgz 
 modules.tgz      tests.tgz        vi.recover       xcomp.tgz 
 xetc.tgz         xserver.tgz
 hppa# ls -l /bin/ls
 -r-xr-xr-x  1 root  wheel  37780 Apr 14 23:35 /bin/ls
 hppa# tar -xzUf base.tgz -C /
 hppa# ls -l /bin/ls
 [1]   Segmentation fault (core dumped) ls -l /bin/ls
 hppa# hash -re
 hash: Illegal option -e
 hppa# hash -r
 hppa# ls -l /bin/ls
 [1]   Segmentation fault (core dumped) ls -l /bin/ls
 hppa# tar
 [1]   Segmentation fault (core dumped) tar
 
 
 regards,
 chris
 


Home | Main Index | Thread Index | Old Index