Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On arm signal trace error #333

Open
Makmanfu opened this issue Mar 25, 2024 · 1 comment
Open

On arm signal trace error #333

Makmanfu opened this issue Mar 25, 2024 · 1 comment

Comments

@Makmanfu
Copy link

compilation platform:Linux frp-OptiPlex-7050 5.4.0-173-generic #191-Ubuntu SMP Fri Feb 2 13:55:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
host platform:arm-linux-gnueabihf

source code:

#define BACKWARD_HAS_DW 1
#include "backward.hpp"

int func2(int * a){
    * a = 12;
    return *a;
}

int func1(){
    return func2(nullptr);
}

int main(int argc, char* argv[]) {
    backward::SignalHandling sh;

    func1();
    return 0;
}

result:

/userdata # ./untitled
Stack trace (most recent call last):
#5 Object "", at 0xb6c8f14f, in
#4 Source "/home/frp/1-Code/example/untitled/backward.hpp", line 4296, in sig_handler [0x33b13]
#3 Source "/home/frp/1-Code/example/untitled/backward.hpp", line 4270, in handleSignal [0x33a85]
#2 Source "/home/frp/1-Code/example/untitled/backward.hpp", line 886, in load_from [0x31961]
#1 Source "/home/frp/1-Code/example/untitled/backward.hpp", line 879, in load_here [0x318ef]
#0 Source "/home/frp/1-Code/example/untitled/backward.hpp", line 861, in unwind<backward::StackTraceImplbackward::system_tag::linux_tag::callback> [0x33e1d]
Segmentation fault (Address not mapped to object [(nil)])
Segmentation fault

@Makmanfu
Copy link
Author

It is correct to run it locally:

Stack trace (most recent call last):
#5    Object "", at 0xffffffffffffffff, in 
#4    Object "/home/frp/1-Code/example/untitled/cmake-build-debug/untitled", at 0x556ef804d01d, in _start
#3    Source "../csu/libc-start.c", line 308, in __libc_start_main [0x7f8619676082]
#2    Source "/home/frp/1-Code/example/untitled/main.cpp", line 44, in main [0x556ef804d122]
         41: int main(int argc, char* argv[]) {
         42: 
         43: 
      >  44:     func1();
         45: 
         46: #if 0
         47:     auto * buffer = new uint8_t [1024];
#1    Source "/home/frp/1-Code/example/untitled/main.cpp", line 38, in func1 [0x556ef804d108]
         35: }
         36: 
         37: int func1(){
      >  38:     return func2(nullptr);
         39: }
         40: backward::SignalHandling sh;
         41: int main(int argc, char* argv[]) {
#0    Source "/home/frp/1-Code/example/untitled/main.cpp", line 33, in func2 [0x556ef804d0e9]
         30: #include "backward.hpp"
         31: 
         32: int func2(int * a){
      >  33:     * a = 12;
         34:     return *a;
         35: }
Segmentation fault (Address not mapped to object [(nil)])

进程已结束,退出代码139 (interrupted by signal 11: SIGSEGV)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant