I've been running into edge cases where FEX's signal handling and Wine's exception handling step on each other, and I wanted to check whether this is a known issue or expected behavior.
Setup: FEXcore (ARM64EC mode) inside Bannerlator, running Windows x86_64 games through Wine 9.x on Android 14 / Mali-G57 MC2.
The issue manifests as occasional game crashes that look like SIGSEGV being delivered to the wrong handler. From what I can tell from the code:
- FEX registers a SIGSEGV handler to catch faults inside translated x86_64 code and recover via emulation
- Wine also registers SIGSEGV handler for Windows SEH (Structured Exception Handling) and guard page handling
- Only one handler actually gets called per signal — depending on registration order, either FEX recovers when it shouldn't, or Wine tries to handle a FEX-internal fault
In practice this shows up as:
- Random game crashes after ~30 min of play
- Stack traces that don't make sense (Wine frames inside FEX JIT cache)
- Some games (MiSide in particular) crash reproducibly on certain operations that I suspect trigger SEH
I noticed FEX has ConfigureSignalHandler and there's some logic for chaining to the previous handler — but it's not clear to me whether Wine's handler is the "previous" one in this setup, or whether there's an explicit handshake between FEX and Wine that I'm missing.
Questions:
- Is FEX supposed to call the previous sigaction when the fault is outside translated code? As far as I can tell from
SignalDelegator.cpp it does, but maybe there's an edge case.
- Does FEX test against Wine's signal handler specifically, or only against generic Linux apps?
- Any recommended env vars or config to make FEX more cooperative with Wine's exception model?
Not sure if this is a bug or just a documentation gap. Happy to provide logs / repro steps if useful.
Device: Realme 10 / Helio G99 / Android 14 / Wine 9.x.
I've been running into edge cases where FEX's signal handling and Wine's exception handling step on each other, and I wanted to check whether this is a known issue or expected behavior.
Setup: FEXcore (ARM64EC mode) inside Bannerlator, running Windows x86_64 games through Wine 9.x on Android 14 / Mali-G57 MC2.
The issue manifests as occasional game crashes that look like SIGSEGV being delivered to the wrong handler. From what I can tell from the code:
In practice this shows up as:
I noticed FEX has
ConfigureSignalHandlerand there's some logic for chaining to the previous handler — but it's not clear to me whether Wine's handler is the "previous" one in this setup, or whether there's an explicit handshake between FEX and Wine that I'm missing.Questions:
SignalDelegator.cppit does, but maybe there's an edge case.Not sure if this is a bug or just a documentation gap. Happy to provide logs / repro steps if useful.
Device: Realme 10 / Helio G99 / Android 14 / Wine 9.x.