NetBSD-Bugs archive

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

Re: lib/55829: memmem_oob test case sometimes fails



The following reply was made to PR lib/55829; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: lib/55829: memmem_oob test case sometimes fails
Date: Fri, 27 Nov 2020 16:15:47 +0200

 Christos Zoulas wrote:
 > The testbeds don't seem to have symbols; do we at least have the
 > coredumps somewhere?
 
 No, for two reasons: ATF removes them up as part of its test case
 isolation, and bracket doesn't preserve the changes made to the disk
 content by the test run.
 
 I was, however, able to reproduce the issue and get a fresh core
 manually on a system with symbols like this:
 
   sysctl -w kern.defcorename="/tmp/%n.core"
   cd /usr/tests/lib/libc/string
   while ./t_memmem memmem_oob; do true; done
 
 For me this crashed within a few seconds, and then you can do
 
   gdb ./t_memmem /tmp/t_memmem.core
 
 The backtrace looks like this:
 
   #0  0x00007f7e81c041a6 in _rtld_symlook_obj_sysv (ventry=0x0, flags=1, 
       obj=0x7b7b5ae2a400, hash=<optimized out>, name=0x8c00774 "memcpy")
       at /usr/src/libexec/ld.elf_so/symbol.c:340
   340             for (symnum = obj->buckets[fast_remainder32(hash, obj->nbuckets,
   (gdb) bt
   #0  0x00007f7e81c041a6 in _rtld_symlook_obj_sysv (ventry=0x0, flags=1, 
       obj=0x7b7b5ae2a400, hash=<optimized out>, name=0x8c00774 "memcpy")
       at /usr/src/libexec/ld.elf_so/symbol.c:340
   #1  _rtld_symlook_obj (name=0x8c00774 "memcpy", hash=<optimized out>, 
       obj=0x7b7b5ae2a400, flags=1, ventry=0x0)
       at /usr/src/libexec/ld.elf_so/symbol.c:429
   #2  0x00007f7e81c045e5 in _rtld_symlook_list (
       name=name@entry=0x8c00774 "memcpy", hash=hash@entry=0x7f7fff4daa28, 
       objlist=<optimized out>, defobj_out=defobj_out@entry=0x7f7fff4da9a8, 
       flags=flags@entry=1, ventry=ventry@entry=0x0, dlp=dlp@entry=0x7f7fff4da9b0)
       at /usr/src/libexec/ld.elf_so/symbol.c:139
   #3  0x00007f7e81c04a99 in _rtld_symlook_default (
       name=name@entry=0x8c00774 "memcpy", hash=hash@entry=0x7f7fff4daa28, 
       refobj=refobj@entry=0x7b7b5ae2a000, 
       defobj_out=defobj_out@entry=0x7f7fff4daa20, flags=flags@entry=1, 
       ventry=<optimized out>) at /usr/src/libexec/ld.elf_so/symbol.c:553
   #4  0x00007f7e81c04e05 in _rtld_find_symdef (symnum=symnum@entry=31, 
       refobj=refobj@entry=0x7b7b5ae2a000, 
       defobj_out=defobj_out@entry=0x7f7fff4daaa0, flags=flags@entry=1)
       at /usr/src/libexec/ld.elf_so/symbol.c:465
   #5  0x00007f7e81c04ef8 in _rtld_find_plt_symdef (symnum=31, 
       obj=obj@entry=0x7b7b5ae2a000, defobj=defobj@entry=0x7f7fff4daaa0, 
       imm=imm@entry=true) at /usr/src/libexec/ld.elf_so/symbol.c:498
   #6  0x00007f7e81c00bc0 in _rtld_relocate_plt_object (tp=<synthetic pointer>, 
       rela=0x8c00b28, obj=0x7b7b5ae2a000)
       at /usr/src/libexec/ld.elf_so/arch/x86_64/mdreloc.c:324
   #7  _rtld_bind (obj=0x7b7b5ae2a000, reloff=<optimized out>)
       at /usr/src/libexec/ld.elf_so/arch/x86_64/mdreloc.c:360
   #8  0x00007f7e81c0082d in _rtld_bind_start () from /usr/libexec/ld.elf_so
   #9  0x0000000000000246 in ?? ()
   #10 0x0000000000001012 in ?? ()
 
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index