Skip to content
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

Re-work test_lowlevel_error_message test #2813

Closed
dentarg opened this issue Jan 28, 2022 · 0 comments
Closed

Re-work test_lowlevel_error_message test #2813

dentarg opened this issue Jan 28, 2022 · 0 comments

Comments

@dentarg
Copy link
Member

dentarg commented Jan 28, 2022

Feedback from #2607 (comment)

# will raise fatal: machine stack overflow in critical region
obj = {}
obj['cycle'] = obj
::JSON.dump(obj)

I think this is not a reliable test for this issue because:

  • Not all Ruby implementations might expose no backtrace for a stack overflow (that's pretty unhelpful, isn't it?)
  • a stack overflow is a regular exception but given it messes the VM badly you can consider the VM corrupted after it, so maybe stack overflows should become fatal in the future, since it's very rarely safe to rescue it (you would need no ensure and no finally in the VM, and no second stack overflow while handling the stack overflow very close to the limit, and probably other things which cannot be guaranteed)
  • More details on Use the bundler shipped with ruby for non-MRI #2811

Maybe we can just test creating an exception and using set_backtrace(nil)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants