Skip to content

Recursive inspect for Data gives StackOverflowError #3847

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

Open
eregon opened this issue May 5, 2025 · 2 comments
Open

Recursive inspect for Data gives StackOverflowError #3847

eregon opened this issue May 5, 2025 · 2 comments
Assignees

Comments

@eregon
Copy link
Member

eregon commented May 5, 2025

From ruby/net-imap#470 (comment)

@nevans
Copy link

nevans commented May 8, 2025

For what it's worth, it looks like the error in the net-imap tests is not with the builtin core Data, but only with the Net::IMAP::Data polyfill. I based the Net::IMAP implementation on the inspect recursion guard methods in pp. But it's not a direct copy, so TruffleRuby might work fine with pp's recursion guard and not with Net::IMAP::Data#inspect's.

(But the builtin Data fails for other more important reasons that weren't captured directly by the Net::IMAP::DataLite tests. I don't expect Net::IMAP::Data to be used for recursive objects, so we don't need this feature to work... I just copied it because it was in CRuby.)

@nevans
Copy link

nevans commented May 8, 2025

Ah, never mind about that last comment. I confused myself at some point, while going back and forth between different versions of the code and different ruby engines. There's definitely a StackOverflowError there!

nevans added a commit to ruby/net-imap that referenced this issue May 8, 2025
This should _not_ be merged into main.  😉

It's only temporary, until bugs in TruffleRuby and JRuby are addressed:
* jruby/jruby#8829
* oracle/truffleruby#3846
* oracle/truffleruby#3847

The JRuby bug is a showstopper.  The TruffleRuby bugs are cosmetic
(inspect "nil" vs "") or academic (we never create recursive Data).
nevans added a commit to ruby/net-imap that referenced this issue May 8, 2025
This should _not_ be merged into main.  😉

It's only temporary, until bugs in TruffleRuby and JRuby are addressed:
* jruby/jruby#8829
* oracle/truffleruby#3846
* oracle/truffleruby#3847

The JRuby bug is a showstopper.  The TruffleRuby bugs are cosmetic
(inspect "nil" vs "") or academic (we never create recursive Data).
nevans added a commit to ruby/net-imap that referenced this issue May 9, 2025
This should _not_ be merged into main.  😉

It's only temporary, until bugs in TruffleRuby and JRuby are addressed:
* jruby/jruby#8829
* oracle/truffleruby#3846
* oracle/truffleruby#3847

The JRuby bug is a showstopper.  The TruffleRuby bugs are cosmetic
(inspect "nil" vs "") or academic (we never create recursive Data).
nevans added a commit to ruby/net-imap that referenced this issue May 13, 2025
This should _not_ be merged into main.  😉

It's only temporary, until bugs in TruffleRuby and JRuby are addressed:
* jruby/jruby#8829
* oracle/truffleruby#3846
* oracle/truffleruby#3847

The JRuby bug is a showstopper.  The TruffleRuby bugs are cosmetic
(inspect "nil" vs "") or academic (we never create recursive Data).
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

3 participants