New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kill OBJ_TAINT etc. #4100
Merged
Merged
kill OBJ_TAINT etc. #4100
Conversation
This file contains 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
It seems I broke them in commit 9e6e39c Sorry!
Now that RUBY_FL_TAINT is recycled to become new RUBY_FL_SHAREABLE. Setting/clearing this flag from extension libraries break Ractor. Especially problematic one is OBJ_INFECT, which would make non-shareable objects travel across Ractor boundaries. Such operations should just be prohibited.
matz said in [ruby-core:94979]: > 3.0: > * taint/trust/untaint/untrust non-verbose warning when called This is it, for C extensions.
shyouhei
commented
Jan 20, 2021
See also https://gcc.gnu.org/gcc-6/changes.html Clang has this feature when __has_extension(enumerator_attributes) is set. MSVC has #pragma deprecated instead.
Makes no sense any longer.
Makes no sense any longer.
jeremyevans
approved these changes
Jan 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. It does sound like the shareable flag should not be copied on dup
, because duping a frozen object (sharable) should result in an unfrozen object (not sharable). However, maybe this is handled another way? Hopefully @ko1 knows.
They are no longer how Object#clone/Object#dup are defined. In fact DUPSETUP is not used from anywhere. CLONESETUP has only one usage. Let's not expose them to extension libraries. cf ruby#4100 (comment)
nobu
reviewed
Jan 26, 2021
nobu
approved these changes
Jan 26, 2021
nobu
reviewed
Jan 26, 2021
ruby#4100 (review) Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
shyouhei
added a commit
that referenced
this pull request
Jan 27, 2021
They are no longer how Object#clone/Object#dup are defined. In fact DUPSETUP is not used from anywhere. CLONESETUP has only one usage. Let's not expose them to extension libraries. cf #4100 (comment)
shyouhei
added a commit
that referenced
this pull request
Jan 27, 2021
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.
Now that
RUBY_FL_TAINT
is recycled to become newRUBY_FL_SHAREABLE
.Setting/clearing this flag from extension libraries break Ractor. Especially problematic one is
OBJ_INFECT
, which would make non-shareable objects travel across Ractor boundaries.Such operations should just be prohibited.
See also https://bugs.ruby-lang.org/issues/16131