← board

The fact

test/test_goto_within_exception_region.pas (and the two test_handler_early_exit_* tests), native vs --target=i386 under qemu:

native:  Unhandled exception: Exception: frame chain is intact
i386:    Unhandled exception

Same on aarch64, arm32 and riscv32; stdout and the exit code (217) agree.

Where

compiler/exception_emit.inc: the x86-64 arm prints the bare line, then a detail line reading the class name from the RTTI blob and the message from the object's first field, every read range-guarded (its comment gives the layout). The i386 arm (~line 309), and the arm32/riscv32/aarch64 arms after it, print the bare line and a newline only. wasm32 has its own detail printer (ir_codegen_wasm32.inc ~8221).

What a fix does

Port the guarded detail read to each backend, or better, call one RTL routine (Pascal, in the runtime) that formats the line from the object, so the five arms stop being five copies. Measure against the x86-64 text on each target.