asmaloney / asmaloney/asmCrashReport
Ubuntu MOD
- Dominant language
- C++
- Stars
- 54
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
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(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(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...
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name a source file or test. Start by reproducing the Ubuntu failure around sigaltstack and the SA_ONSTACK flag, then compare the two stack_t initialization forms shown. Done should mean the signal handler works on Ubuntu and produces the expected crash report and stack trace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ubuntu
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100