alexcrichton opened PR #2039 from fix-reference-types to main:
Currently
Func::newwill panic if one of the arguments of the function
is a reference type and theStoredoesn't have reference types
enabled. This happens because cranelift isn't configure to enable stack
maps but the register allocators expects them to exist when reference
types are seen.The fix here is to always enable reference types in cranelift for our
trampoline generation andFunc::new. This should hopefully ensure that
trampolines are generated correctly and they'll just not be able to get
hooked up to anInstancebecause validation will prevent reference
types from being used elsewhere.
fitzgen submitted PR Review.
alexcrichton merged PR #2039.
Last updated: Dec 13 2025 at 19:03 UTC