Skip to content

Test for ArrayList(u0).toOwnedSlice() #24531

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
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IOKG04
Copy link

@IOKG04 IOKG04 commented Jul 21, 2025

As described in #22483, previously, calling toOwnedSlice() on an ArrayList of zero-sized type could result in an assertion error depending on the allocator used.
The issue has since been fixed in 7eeef5f due to remap()'s special handling of zero-sized types, but to ensure this doesn't regress I modified the existing test concerning Arraylist(u0) to also include toOwnedSlice().

Edit: Forgot to put this here initially (cause I didn't know the syntax), but this should close #22483

IOKG04 added 2 commits July 21, 2025 14:05
otherwise someone will probably wonder why it's there and potentially remove it
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.

ArrayList.toOwnedSlice assertion error with zero-sized types
1 participant