-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rework
hasExternalPointer
internals (#12408)
* + hasExternalPointer() * fix pairlistHasExternalPointer() and envHasExternalPointer() * simplify rs_hasExternalPtr() * misunderstood the role of nullPtr * handle already evaluated promises * + getWeakRefKey(), getWeakRefValue() * tests for hasExternalPointer() covering most cases * hunt for external pointers in CLOSXP * move frameBindingIsActive() to where used * update promise check so that eval.env() is local env, not global env * add makeExternalPtr(void*, SEXP, SEXP) * use .Call("rs_newTestExternalPointer")
- Loading branch information
1 parent
5189a79
commit b735c15
Showing
5 changed files
with
328 additions
and
56 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
b735c15
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.
@romainfrancois This commit causes
R
session to crash if you assign a "complex" object, try this from?lm
:RStudio ver. 2023.03.0-daily+25 (in 2023.03.0-daily+24 there is no such issue)
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.1
b735c15
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.
I'm seeing this as well.
@romainfrancois can you take a look?
b735c15
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.
I believe this is the ALTREP deferred string:
and I can reproduce the crash with the simpler:
b735c15
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.
Now I'm pretty sure it's this, from https://github.com/r-devel/r-svn/blob/b7a3736e38919613e8a1ba44977ebca7a640938b/src/main/altclasses.c#L622-L638
aka some
SEXP
are null pointer.b735c15
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.
there was more to this story; but I think this fixes it: #12445