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

Ubuntu MOD #20

Open
Duolabs opened this issue Mar 19, 2024 · 0 comments
Open

Ubuntu MOD #20

Duolabs opened this issue Mar 19, 2024 · 0 comments

Comments

@Duolabs
Copy link

Duolabs commented Mar 19, 2024

Hi Alex,

To make it work on Ubuntu you have to change this line:

sigAction.sa_flags = SA_SIGINFO | SA_ONSTACK;

to:

sigAction.sa_flags = SA_SIGINFO;

Like on MACOS

this part is giving me an error:

          // setup alternate stack
          stack_t ss{
              static_cast<void*>(sAlternateStack),
              SIGSTKSZ,
              0
          };

          if ( sigaltstack( &ss, nullptr ) != 0 )
          {
             err( 1, "sigaltstack" );
          }


while this is stting up properly the sigalt:

          stack_t ss;
          ss.ss_sp = static_cast<void*>(sAlternateStack); //sAlternateStack;
          ss.ss_size = SIGSTKSZ;
          ss.ss_flags = 0; // Use the default flags (usually 0)
          if (sigaltstack(&ss, nullptr) != 0) {
              err(1, "sigaltstack");
          }

Does it make any sense?

Even tough I am getting this log:

asmCrashReportTest v1.0.0
19 Mar 2024 @ 23:51:55

Caught SIGFPE: (integer divide by zero)

/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420) [0x7fc6cdc00420]
/home/ubuntu/Desktop/__DEV__/asmCrashReport-master/build-test-Desktop_Qt_6_3_0_GCC_64bit-Debug/asmCrashReportTest(+0xad4b) [0x55ef2afe8d4b]
/home/ubuntu/Desktop/__DEV__/asmCrashReport-master/build-test-Desktop_Qt_6_3_0_GCC_64bit-Debug/asmCrashReportTest(+0xadb4) [0x55ef2afe8db4]
/home/ubuntu/Desktop/__DEV__/asmCrashReport-master/build-test-Desktop_Qt_6_3_0_GCC_64bit-Debug/asmCrashReportTest(+0xadd9) [0x55ef2afe8dd9]
/home/ubuntu/Desktop/__DEV__/asmCrashReport-master/build-test-Desktop_Qt_6_3_0_GCC_64bit-Debug/asmCrashReportTest(+0xac12) [0x55ef2afe8c12]
/home/ubuntu/Desktop/__DEV__/asmCrashReport-master/build-test-Desktop_Qt_6_3_0_GCC_64bit-Debug/asmCrashReportTest(+0xa966) [0x55ef2afe8966]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fc6cd821083]

I am investinating over it...

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