Skip to content

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Jun 21, 2023

Fixes #50243.

Stack allocate the struct we dereference from unsafe_load(), when it is a Ptr to an immutable.

Also make the same fix to codegen for unsafe_store!() on non-isbits immutables.
This also fixes a crash caused by illegal instruction.
See: #50243 (comment)

Also adds tests that these don't allocate, and that it doesn't crash.
The tests fail on master, and pass after this commit.

Add test that this doesn't allocate.

The test fails on master, and passes after this commit.
This also **fixes a crash** caused by illegal instruction.

See:
#50243 (comment)
@NHDaly NHDaly changed the title Stack allocate unsafe_load() Ptr to immutable. Stack allocate unsafe_load() and unsafe_store!() for Ptr to immutable. Jun 21, 2023
@vtjnash
Copy link
Member

vtjnash commented Jun 21, 2023

Replaced by #50164 (sorry for the duplicate work!)

@vtjnash vtjnash closed this Jun 21, 2023
@giordano giordano deleted the nhd-stack-allocate-unsafe_load-immutable branch February 25, 2024 21:39
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.

Unnecessary boxing allocation for unsafe_load() on ptr to non-isbits immutable
2 participants