[FIX] replace fprintf(), exit() with write(), _exit() to async-safe at SIGSEGV signal handler#435
Merged
Merged
Conversation
r1viollet
force-pushed
the
r1viollet/SIGSEGV-async-safe-handler
branch
from
January 16, 2025 14:05
b1f373c to
48b1a0a
Compare
r1viollet
force-pushed
the
r1viollet/SIGSEGV-async-safe-handler
branch
from
January 16, 2025 14:07
48b1a0a to
37e0884
Compare
Benchmark results for collatzParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
Benchmark results for BadBoggleSolver_runParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
r1viollet
force-pushed
the
r1viollet/SIGSEGV-async-safe-handler
branch
from
January 16, 2025 14:47
37e0884 to
bedc627
Compare
nsavoire
previously approved these changes
Jan 17, 2025
Contributor
|
@r1viollet Thank you for accepting my commit |
r1viollet
force-pushed
the
r1viollet/SIGSEGV-async-safe-handler
branch
from
January 21, 2025 10:31
bedc627 to
7c30284
Compare
r1viollet
commented
Jan 21, 2025
|
|
||
| int convert_addr_to_string(uintptr_t ptr, char *buff, size_t buff_size); | ||
|
|
||
| void sigsegv_handler(int sig, siginfo_t *si, void *uc); |
Collaborator
Author
There was a problem hiding this comment.
I ended up moving the signal handler logic to here.
- Improve the crash log to include address info - Deduplicate the crash handling function with simple malloc
r1viollet
force-pushed
the
r1viollet/SIGSEGV-async-safe-handler
branch
from
January 21, 2025 13:56
7c30284 to
cf9ec33
Compare
Collaborator
Author
|
@nsavoire I will need a new approval |
nsavoire
approved these changes
Jan 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a continuation of the work proposed here.
I made some minor changes to include the address on which we are crashing (the address we attempt to access).
Motivation
Refer to original PR.
Thank you @Backend-Changyeon for suggesting the change.
Additional Notes
There will be more work on crashtracking.
How to test the change?
I added a minor unit test, though a proper test on the SIGSEGV would be welcome.