-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: invalid scalar pair layout #98176
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
1b9daa6 is the first bad commit. |
The ICE happens while popping a stack frame, here in the interpreter:
Specifically this is while returning from
That function is really odd since it uses |
(IOW, this is an instance of #95453, but usually that bug can only be triggered by actually using a custom allocator -- whereas now with this btree implementation it can be triggered even on code not using any unstable features.) |
The reason for the |
#98178 is my proposal for fixing this. |
If someone has an A: Allocator that is not Copy, they can use &A to get a Copy allocator and pay the cost of the indirection.
But your current approach forces *everyone* to pay that cost, even if their allocator is Copy. That is in violation of the zero cost principle.
|
Even after landing #98178 and #98233, I am still getting ICEs when running the liballoc test suite in Miri -- not entirely sure where they are coming from.
|
After removing some more |
Remove accidental uses of `&A: Allocator` Cc rust-lang#98232 Fixes rust-lang#98176 (for real this time)
btree: avoid forcing the allocator to be a reference The previous code forces the actual allocator used to be some `&A`. This generalizes the code to allow any `A: Copy`. If people truly want to use a reference, they can use `&A` themselves. Fixes rust-lang/rust#98176
Remove accidental uses of `&A: Allocator` Cc rust-lang/rust#98232 Fixes rust-lang/rust#98176 (for real this time)
This test in Miri recently started ICEing:
So we have a ScalarPair value with Scalar layout. Clearly something went wrong somewhere earlier when that value was constructed.
Backtrace
Good commit: 1f34da9
ICE: 6ec3993
The text was updated successfully, but these errors were encountered: