Preserve wasm pointer allocas for shadow stack GC under -O2#1
Preserve wasm pointer allocas for shadow stack GC under -O2#1Copilot wants to merge 3 commits intorelease/16.xfrom
Conversation
|
@copilot I got it. Then implement this fix and check this fix. |
|
@copilot 实际上我的问题是,一个变量通过堆分配拿到的指针,只存在local寄存器里,没往linear memory的shadow stack(即(__stack_pointer + n)的内存区域)里同步。并不是在local里寄存的__stack_pointer本身没有向global同步。举例: // 创建新节点并添加到链表头部 下面是O0情况下的被编译成的wasm指令,可以看到新的node被存储到了__stack_pointer + n的区域 |
|
@copilot I got it. Then implement this fix and check this fix. |
Co-authored-by: PLUTOFX <110596339+PLUTOFX@users.noreply.github.com>
Co-authored-by: PLUTOFX <110596339+PLUTOFX@users.noreply.github.com>
Optimized WebAssembly codegen can drop shadow stack synchronization by promoting pointer allocas into locals, leaving GC roots invisible in linear memory.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.