In case of MIPS64 target for invalid 64 bit address ,it generated SIGBUS signal with si_code=SI_KERNEL. This patch handle the above mentioned case.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Is "SI_KERNEL" part of posix? I wonder if we need to put a "#ifdef SI_KERNEL" / "#endif" around this case and possibly other cases. If it is part of the POSIX spec, then this is good.
I think SI_KERNEL is not part of the POSIX specification. I will update the file with suggested changes.
Thanks
So we are putting non-posix crash reasons into POSIX? Seems wrong to me. Seems like this should be detected in the linux specific code before letting a CrashReason.cpp crash reason if this is linux specific.
Fix typo and good to go
source/Plugins/Process/Linux/NativeThreadLinux.cpp | ||
---|---|---|
267 ↗ | (On Diff #30678) | type above: SI_KERENEL, should be SI_KERNEL |
source/Plugins/Process/Linux/NativeThreadLinux.cpp | ||
---|---|---|
268 ↗ | (On Diff #30678) | As an option to make more concise: const auto reason = (info->si_signo == SIGBUS && info->si_code == SI_KERNEL) ? CrashReason::eInvalidAddress : GetCrashReason(*info); m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr)); |
268 ↗ | (On Diff #30678) | Please make sure that the change isn't introducing test regressions on Linux. |
Fixed typo and modified file as per suggestion . This patch is tested on linux and working without any failures.