Skip to content

[Profiler] Save and restore the value of errno in the signal handler#3370

Merged
kevingosse merged 1 commit into
masterfrom
kevin/profiler_errno
Oct 20, 2022
Merged

[Profiler] Save and restore the value of errno in the signal handler#3370
kevingosse merged 1 commit into
masterfrom
kevin/profiler_errno

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor

Summary of changes

Save and restore the value of errno in the signal handler.

Reason for change

It seems like the Libunwind can change the value of errno when validating whether an address is valid: https://github.com/libunwind/libunwind/blob/47aef9392723e4816d94d4efda4248180aece7f5/src/x86_64/Ginit.c#L185

This can lead the CLR to preventively crash because it finds an unexpected errono value after calling epoll_wait.

@kevingosse kevingosse added the area:profiler Issues related to the continous-profiler label Oct 19, 2022
@kevingosse
kevingosse requested a review from a team as a code owner October 19, 2022 12:56

@gleocadie gleocadie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevingosse
kevingosse merged commit 219d2d8 into master Oct 20, 2022
@kevingosse
kevingosse deleted the kevin/profiler_errno branch October 20, 2022 11:40
@github-actions github-actions Bot added this to the vNext milestone Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:profiler Issues related to the continous-profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants