The issue appears to be related to how QEMU handles exceptions during CPU execution when running bare-metal code compiled for Cortex-M33. The crash occurs due to an unhandled CPU exception (0x8), which suggests that there might be an issue with how certain instructions or memory accesses are handled in the emulator. The problem is not directly tied to a specific instruction being faulty but rather to how QEMU processes exceptions during runtime, particularly when executing code compiled at different optimization levels (-O2 vs. -Os). Since the crash only happens at -Os and involves nested functions creating trampolines on the stack, it might relate to how the stack or function calls are managed in the emulator. Therefore, this seems to fall under a **runtime** error within QEMU's handling of the CPU context. runtime