Skip to content

Make RbExceptionFormatter#format error tolerant #331

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

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

kateinoigakukun
Copy link
Member

Ruby exceptions can be raised during formatting exceptions, so the formatting logic can be infinitely recursion and it makes the backtrace difficult to read.

Here is an example crash log for such case.

...
Crashed while printing bug report
Crashed while printing bug report
Crashed while printing bug report
...
at RbAbiGuest.apply [as rbVmBugreport] (dist/cjs/index.js:63:44)
at rbVmBugreport (dist/cjs/index.js:550:18)
at wrapRbOperation (dist/cjs/index.js:563:12)
at RbValue.callRbMethod [as call] (dist/cjs/index.js:419:28)
at RbExceptionFormatter.call [as format] (dist/cjs/index.js:489:33)
at format (dist/cjs/index.js:535:64)
at checkStatusTag (dist/cjs/index.js:565:9)
at body (dist/cjs/index.js:542:16)
at wrapRbOperation (dist/cjs/index.js:563:12)
at RbValue.callRbMethod [as call] (dist/cjs/index.js:419:28)
at RbExceptionFormatter.call [as format] (dist/cjs/index.js:489:33)
at format (dist/cjs/index.js:535:64)
at checkStatusTag (dist/cjs/index.js:565:9)
at body (dist/cjs/index.js:542:16)
at wrapRbOperation (dist/cjs/index.js:563:12)
at RbValue.callRbMethod [as call] (dist/cjs/index.js:419:28)
at RbExceptionFormatter.call [as format] (dist/cjs/index.js:489:33)
at format (dist/cjs/index.js:535:64)
at checkStatusTag (dist/cjs/index.js:565:9)
at body (dist/cjs/index.js:542:16)
...

@kateinoigakukun kateinoigakukun marked this pull request as ready for review December 5, 2023 12:18
@kateinoigakukun kateinoigakukun merged commit 3e07094 into main Dec 5, 2023
@kateinoigakukun kateinoigakukun deleted the pr-e063f53aaa8d0fab071fc56cad811a29ba29e1b4 branch December 5, 2023 12:42
@kateinoigakukun kateinoigakukun added this to the 2.4.0 milestone Dec 5, 2023
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.

1 participant