expect SIGBUS for PROT_NONE access on macOS/*BSD due to overlapped timer#34
Merged
spoonincode merged 2 commits intomainfrom Feb 4, 2025
Merged
expect SIGBUS for PROT_NONE access on macOS/*BSD due to overlapped timer#34spoonincode merged 2 commits intomainfrom
SIGBUS for PROT_NONE access on macOS/*BSD due to overlapped timer#34spoonincode merged 2 commits intomainfrom
Conversation
heifner
approved these changes
Feb 3, 2025
greg7mdp
reviewed
Feb 3, 2025
include/eosio/vm/signals.hpp
Outdated
| #else //macos, *bsd | ||
| const int sig_on_prot_none_access = SIGBUS; | ||
| #endif | ||
| if (sig == sig_on_prot_none_access && timed_run_has_timed_out.load(std::memory_order_acquire) == false) |
Contributor
There was a problem hiding this comment.
Could we check for both signals instead of having platform differences?
Suggested change
| if (sig == sig_on_prot_none_access && timed_run_has_timed_out.load(std::memory_order_acquire) == false) | |
| if ((sig == SIGSEV || sig == SIGBUS) && timed_run_has_timed_out.load(std::memory_order_acquire) == false) |
Contributor
Author
There was a problem hiding this comment.
Yes we can probably do that because we never install a SIGBUS handler on Linux; so we will trade the specificity for a comment noting such nuance.
heifner
approved these changes
Feb 4, 2025
greg7mdp
approved these changes
Feb 4, 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.
As I suspected at #30 (comment), now that I have my x86 macOS box updated so I can run latest XCode, indeed this needs to be a
SIGBUS