Repository navigation
Improve robustness of the crash signal handler - #134
Merged
Merged
Conversation
Contributor
Contributor
|
🔧 Report generated by pr-comment-scanbuild Scan-Build Report
Bug Summary
Reports
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
jbachorik
force-pushed
the
jb/sigseg_handler
branch
5 times, most recently
from
September 24, 2024 18:01
81680ef to
eb090dc
Compare
jbachorik
marked this pull request as ready for review
September 24, 2024 18:01
jbachorik
force-pushed
the
jb/sigseg_handler
branch
from
September 25, 2024 08:53
eb090dc to
b1052b3
Compare
jbachorik
marked this pull request as draft
September 25, 2024 09:14
jbachorik
force-pushed
the
jb/sigseg_handler
branch
2 times, most recently
from
September 25, 2024 12:32
573e392 to
e5a8012
Compare
jbachorik
force-pushed
the
jb/sigseg_handler
branch
from
September 25, 2024 12:47
e5a8012 to
3b78d42
Compare
jbachorik
marked this pull request as ready for review
September 25, 2024 13:00
jbachorik
force-pushed
the
jb/sigseg_handler
branch
from
October 9, 2024 21:45
619c8fb to
5771133
Compare
richardstartin
approved these changes
Oct 11, 2024
r1viollet
reviewed
Oct 11, 2024
r1viollet
reviewed
Oct 11, 2024
r1viollet
reviewed
Oct 11, 2024
jbachorik
added a commit
that referenced
this pull request
Oct 14, 2024
This reverts commit 44c2f8e.
2 of 3 tasks
r1viollet
reviewed
Oct 15, 2024
|
|
||
| bool Profiler::crashHandler(int signo, siginfo_t *siginfo, void *ucontext) { | ||
| ProfiledThread* thrd = ProfiledThread::current(); | ||
| if (thrd != nullptr && !thrd->enterCrashHandler()) { |
Contributor
There was a problem hiding this comment.
this puts some weight on the thread object to be always valid or null
r1viollet
reviewed
Oct 15, 2024
| if (thrd) { | ||
| thrd->exitCrashHandler(); | ||
| } | ||
| longjmp(*(jmp_buf *)vm_thread->exception(), 1); |
Contributor
There was a problem hiding this comment.
should we std::atomic_thread_fence ?
r1viollet
reviewed
Oct 16, 2024
| VMThread *vm_thread = VMThread::current(); | ||
| if (vm_thread != NULL && sameStack(vm_thread->exception(), &vm_thread)) { | ||
| if (thrd) { | ||
| thrd->exitCrashHandler(); |
Contributor
There was a problem hiding this comment.
This does not work, we are doing a longjmp, so we should reset before exiting. Here the increments will build up.
4 of 5 tasks
2 of 3 tasks
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 an attempt to increase the robustness of the crash signal handler by
Motivation:
Additional Notes:
How to test the change?:
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!