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

Intersecting with a Set type object exhausts memory #2514

Closed
taboege opened this issue Dec 3, 2018 · 3 comments
Closed

Intersecting with a Set type object exhausts memory #2514

taboege opened this issue Dec 3, 2018 · 3 comments
Labels
tests needed Issue is generally resolved but tests were not written yet

Comments

@taboege
Copy link
Contributor

taboege commented Dec 3, 2018

The Problem

Intersecting a set object with a set type object leads to out-of-memory error.

Expected Behavior

No overzealous memory consumption. Probably the empty set.

Actual Behavior

MoarVM panic: Memory allocation failed; could not allocate xyz bytes

Steps to Reproduce

$ ulimit -v $((1024*1024)) && perl6 -e 'Set ∩ set(1)'

It doesn't matter if the other set is empty or not.

Suggestion by timotimo++:
https://colabti.org/irclogger/irclogger_log/perl6?date=2018-12-03#l718

Environment

Tested on camelia rakudo-moar 38bc682b0.

@lizmat
Copy link
Contributor

lizmat commented Dec 5, 2018

Fixed with 99d94db

@lizmat lizmat added the tests needed Issue is generally resolved but tests were not written yet label Dec 5, 2018
@lizmat
Copy link
Contributor

lizmat commented Dec 5, 2018

Additional fix with 9f5cc8d , tests added with Raku/roast@771ab61bf4

@lizmat lizmat closed this as completed Dec 5, 2018
@taboege
Copy link
Contributor Author

taboege commented Dec 5, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests needed Issue is generally resolved but tests were not written yet
Projects
None yet
Development

No branches or pull requests

2 participants