Conversation
Data segment offsets, element segment offsets, and element expression items were only matching ConstExpr::Global and ConstExpr::RefFunc when building the GC root set. If any of these used a ConstExpr::Extended containing GlobalGet or RefFunc operations, those references would not be marked as used, causing the GC pass to potentially remove globals or functions that are still referenced. Extract a push_const_expr_refs helper that handles all ConstExpr variants (including Extended) and use it uniformly for globals, data segment offsets, element offsets, and element expression items.
|
Added a commit to fix a pre-existing bug in Problem: The GC used-set pass only matched
If any of these used a Fix: Extracted a |
Two small changes:
MemArgoffsets to 32 bitsConstExpr::Extendedwhen accessing data segments and tables. This is not strictly memory64 related, but the memory64 spec-tests require it, and its a trivial change.This change is not backwards compatible,
MemArg.offsethas changed from au32to au64.