Skip to content

Conversation

@DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Jul 26, 2023

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 DavisVaughan force-pushed the fix/faulty-unwind-protect-variable branch from 5525adc to 98343fe Compare July 27, 2023 19:25
@DavisVaughan DavisVaughan force-pushed the fix/faulty-unwind-protect-variable branch from 98343fe to 7fd15aa Compare July 27, 2023 19:27
@DavisVaughan DavisVaughan marked this pull request as ready for review July 27, 2023 21:14
Copy link
Contributor

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@lionel- lionel- left a comment

Choose a reason for hiding this comment

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

Nice writeup!

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