FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove `cpp11_should_unwind_protect` altogether by DavisVaughan · Pull Request #327 · r-lib/cpp11 · GitHub

/ cpp11 Public

Remove cpp11_should_unwind_protect altogether - #327

Merged
DavisVaughan merged 7 commits into
r-lib:mainfrom
DavisVaughan:fix/faulty-unwind-protect-variable
Jul 28, 2023
Merged

DavisVaughan merged 7 commits into
r-lib:mainfrom
DavisVaughan:fix/faulty-unwind-protect-variable

Conversation

DavisVaughan commented Jul 26, 2023 •
edited
Loading

Copy link
Copy Markdown
Member

Closes #325
Closes #326

  • Update documentation to talk about dangers of nested unwind protection
  • Update documentation to talk about dangers of using C++ code that calls destructors from within a manual unwind_protect() call (since the destructors won't run if a longjmp occurs)
  • Update documentation to talk about performance of cpp11 character vectors in a loop, and how to use unwind_protect() manually to avoid the performance hit
  • Update NEWS bullet
  • 2nd order revdep checking (these came back clean)

Note that this makes the example from #298 very slow again, because nested unwind_protect() is no longer "optimized". This is an example where character vector manipulation may be better with a manual unwind_protect() + R C API usage

DavisVaughan force-pushed the fix/faulty-unwind-protect-variable branch from 5525adc to 98343fe Compare July 27, 2023 19:25
DavisVaughan force-pushed the fix/faulty-unwind-protect-variable branch from 98343fe to 7fd15aa Compare July 27, 2023 19:27
DavisVaughan marked this pull request as ready for review July 27, 2023 21:14

kevinushey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM!

lionel- left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice writeup!

Comment thread vignettes/FAQ.Rmd Outdated
Comment thread vignettes/FAQ.Rmd Outdated
Comment thread vignettes/FAQ.Rmd Outdated
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested unwind_protect() calls going through R can be very dangerous unwind_protect() global option is falsely assumed to be immutable

3 participants


Back | FazBrowse Home | New Git URL