NetBSD-Bugs archive

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

toolchain/56771: profiled programs crash in __mcount



>Number:         56771
>Category:       toolchain
>Synopsis:       profiled programs crash in __mcount
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 26 17:50:00 +0000 2022
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.95
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD thirdstage.duskware.de 9.99.95 NetBSD 9.99.95 (MODULAR) #536: Sat Mar 26 09:19:27 CET 2022 martin%thirdstage.duskware.de@localhost:/usr/src/sys/arch/sparc64/compile/MODULAR sparc64
Architecture: sparc64
Machine: sparc64
>Description:

On sparc64 PIE programs compiled with profiling crash in mcount.
Example from the usr.bin/c++/t_call_once test:

> cat test.cc 
#include <cstdio>
#include <thread>
#include <mutex>
std::once_flag flag;
int main(void) {
        std::call_once(flag, [](){ printf("hello, world!\n"); });
        return 0;
}
> c++ -pg -o call_once test.cc -pthread
gdb ./call_once
(gdb) run
Starting program: /tmp/call_once 

Program received signal SIGBUS, Bus error.
__mcount (frompc=<optimized out>, selfpc=0)
    at /usr/src/lib/libc/../../common/lib/libc/gmon/mcount.c:204
204                     top->selfpc = selfpc;


>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index