NetBSD Problem Report #57177

From martin@duskware.de  Mon Jan  9 11:51:16 2023
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9AAB51A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  9 Jan 2023 11:51:16 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: new ld.elf_so breaks C++ code
X-Send-Pr-Version: 3.95

>Number:         57177
>Category:       lib
>Synopsis:       new ld.elf_so breaks C++ code
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 09 11:55:00 +0000 2023
>Closed-Date:    Thu Aug 24 02:54:03 +0000 2023
>Last-Modified:  Thu Aug 24 02:54:03 +0000 2023
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 10.99.2 NetBSD 10.99.2 (GENERIC) #253: Mon Jan 9 12:10:15 CET 2023 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

After updating to -current as of today, atf is broken:

[/tmp] martin@space-truckin > atf-run
terminate called after throwing an instance of 'tools::not_found_error<tools::fs::path>'
terminate called recursively
Abort (core dumped)
[/tmp] martin@space-truckin > gdb atf-run.core 
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "armeb--netbsdelf-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
terminate called after throwing an instance of 'gdb_exception_error'
terminate called recursively
Abort (core dumped)


>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: lib/57177: new ld.elf_so breaks C++ code
Date: Mon, 9 Jan 2023 12:59:25 +0100

 Backing out r1.63 of src/libexec/ld.elf_so/map_object.c fixes the issue,
 and now gdb works again too:

 Core was generated by `atf-run'.
 Program terminated with signal SIGABRT, Aborted.
 #0  0x6e67bd78 in _lwp_kill () from /usr/lib/libc.so.12
 (gdb) bt
 #0  0x6e67bd78 in _lwp_kill () from /usr/lib/libc.so.12
 #1  0x6e67a8dc in abort () at /work/src/lib/libc/stdlib/abort.c:74
 #2  0x6e818410 in __gnu_cxx::__verbose_terminate_handler ()
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/vterminate.cc:50
 #3  0x6e822354 in __cxxabiv1::__terminate (handler=<optimized out>)
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:48
 #4  0x6e822400 in std::terminate ()
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:58
 #5  0x6e82234c in __cxxabiv1::__cxa_rethrow ()
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_throw.cc:133
 #6  0x6e8183c8 in __gnu_cxx::__verbose_terminate_handler ()
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/vterminate.cc:80
 #7  0x6e822354 in __cxxabiv1::__terminate (handler=<optimized out>)
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:48
 #8  0x6e822400 in std::terminate ()
     at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:58
 #9  0x6e8222d8 in __cxxabiv1::__cxa_throw (obj=obj@entry=0x6e49c050, 
     tinfo=0xf403f24 <typeinfo for tools::not_found_error<tools::fs::path>>, 
     dest=0xf3e49c8 <tools::not_found_error<tools::fs::path>::~not_found_error()>
 ) at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_throw.cc:95
 #10 0x0f3ce438 in tools::read_atffile (filename=...)
     at /work/hosts/evbearmv7hf-eb/usr/include/g++/ext/new_allocator.h:89
 #11 0x0f3dd14c in atf_run::main (this=0x7ffb95f0)
     at /work/src/external/bsd/atf/dist/tools/atf-run.cpp:553
 #12 0x0f3d0070 in tools::application::app::run (this=this@entry=0x7ffb95f0, 
     argc=argc@entry=1, argv=argv@entry=0x7ffb968c)
     at /work/src/external/bsd/atf/dist/tools/application.cpp:282
 #13 0x0f3dd0c4 in main (argc=1, argv=0x7ffb968c)
     at /work/src/external/bsd/atf/dist/tools/atf-run.cpp:595


 Martin

State-Changed-From-To: open->closed
State-Changed-By: rin@NetBSD.org
State-Changed-When: Thu, 24 Aug 2023 02:54:03 +0000
State-Changed-Why:
Temporal broken in -current. Fixed just soon:
http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/ld.elf_so/map_object.c#rev1.64


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.