alexcrichton opened issue #4298:
https://github.com/bytecodealliance/wasmtime/issues/3340, specifically this:
Note that UDF has an immediate parameter, which could be used to address the second point to an extent, e.g. UDF #0xBAD could signify Cranelift-generated code.
got me wondering if we can store the
.wasmtime.traps
section directly in the text section instead of in a separate section of the executable. As a separate section this is somewhat hefty and would probably be much smaller if we simply stored the trap code in the instruction itself (like#0xBAD
above).I'm not sure if this is possible on all platforms though or whether it's even going to net us all that many savings. Not having to manage a side table of traps though would indeed simplify a number of pieces related to trap handling in Wasmtime.
alexcrichton labeled issue #4298:
https://github.com/bytecodealliance/wasmtime/issues/3340, specifically this:
Note that UDF has an immediate parameter, which could be used to address the second point to an extent, e.g. UDF #0xBAD could signify Cranelift-generated code.
got me wondering if we can store the
.wasmtime.traps
section directly in the text section instead of in a separate section of the executable. As a separate section this is somewhat hefty and would probably be much smaller if we simply stored the trap code in the instruction itself (like#0xBAD
above).I'm not sure if this is possible on all platforms though or whether it's even going to net us all that many savings. Not having to manage a side table of traps though would indeed simplify a number of pieces related to trap handling in Wasmtime.
yuyang-ok commented on issue #4298:
I think it is fine to save trap_code after
udf
on riscv.
yuyang-ok deleted a comment on issue #4298:
I think it is fine to save trap_code after
udf
on riscv.
yuyang-ok commented on issue #4298:
I think a explicit
udf ...
can store trap code in.text
, but aload
can causeHeapOutOFBounds
trap and there is no place to save trap_code.
yuyang-ok edited a comment on issue #4298:
I think a explicit
udf ...
can store trap code in.text
, but aload
may causeHeapOutOFBounds
trap and there is no place to save trap_code.
yuyang-ok edited a comment on issue #4298:
I think a explicit
udf ...
can store trap code in.text
, but aload
may causeHeapOutOFBounds
trap and there is no place to save trap_code.
I meanudf
always cause trap can store trap_code afterudf
.
load
may trap maybe have to emit ajump
jumpover trap_code , this is a little wired.
Last updated: Dec 23 2024 at 12:05 UTC