Skip to content

Infinite loop in TableStepperBase on trySplit #11468

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

Closed
lrytz opened this issue Apr 3, 2019 · 11 comments · Fixed by scala/scala#7970
Closed

Infinite loop in TableStepperBase on trySplit #11468

lrytz opened this issue Apr 3, 2019 · 11 comments · Fixed by scala/scala#7970
Assignees
Milestone

Comments

@lrytz
Copy link
Member

lrytz commented Apr 3, 2019

This hangs

scala> collection.mutable.HashSet("1", "2").stepper.trySplit

here: https://github.com/scala/scala/blob/63769aff4d7301b595d5b3cd71a28c31313ff408/src/library/scala/collection/convert/impl/TableStepper.scala#L58

@lrytz
Copy link
Member Author

lrytz commented Apr 3, 2019

cc @Ichoran

@lrytz
Copy link
Member Author

lrytz commented Apr 3, 2019

(found while porting tests over from java8-compat, https://github.com/scala/scala/compare/2.13.x...lrytz:java8-tests?expand=1)

@SethTisue SethTisue added this to the 2.13.0 milestone Apr 3, 2019
@SethTisue
Copy link
Member

@lrytz is 2.13.0 a reasonable milestone for this?

@Ichoran
Copy link

Ichoran commented Apr 4, 2019

I'll test the trySplits tonight. I think fixing them all will be practical in a short period of time.

@Ichoran
Copy link

Ichoran commented Apr 4, 2019

Verified, and I think there are correctness issues with all the other set/map splitters. The others all seem fine. I'll investigate shortly.

@Ichoran
Copy link

Ichoran commented Apr 4, 2019

BitSets also keep returning empty steppers instead of eventually giving null on splits. Bad practice, though the Java API tolerated it last I checked.

@lrytz
Copy link
Member Author

lrytz commented Apr 4, 2019

I think we don't need to delay RC1 over these bugs, but should fix them for RC2 / .0

@SethTisue SethTisue modified the milestones: 2.13.0, 2.13.0-RC2 Apr 4, 2019
@Ichoran
Copy link

Ichoran commented Apr 4, 2019

Yeah, okay. I've fixed this one; will submit one PR to fix both the TableStepper bug and the ChampStepper one (it skips elements).

@Ichoran
Copy link

Ichoran commented Apr 7, 2019

Have a fix in https://github.com/Ichoran/scala/tree/issue-11468

Is 2.13.x still what I should rebase against?

@SethTisue
Copy link
Member

yes

@lrytz
Copy link
Member Author

lrytz commented Apr 8, 2019

@Ichoran I included your commit in my PR with the new tests: scala/scala#7970. It fixes the issues I observed. If you have time to review this one, that would be great :)

@SethTisue SethTisue changed the title Infinite loop inm TableStepperBase on trySplit Infinite loop in TableStepperBase on trySplit Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants