You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix i686 FPU restore: do not treat fpregs as kernel _fpstate
On Linux i386, uc_mcontext.fpregs points at glibc struct _libc_fpstate, which does not match the kernel struct _fpstate layout at the mxcsr and magic offsets. Reinterpreting the pointer and loading mxcsr could pass arbitrary bits to LDMXCSR and corrupt SSE state, matching ASan SEGVs in std::ostream::sentry after a SIGFPE-driven MathExc.
Read MXCSR from the live CPU on Linux i386 (with the same 0x1f80 fallback when needed) instead of through a struct _fpstate cast. Also append CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to CMAKE_REQUIRED_FLAGS while probing ucontext/fpstate members so multilib -m32 configure tests see the same struct layout as the build.
Made-with: Cursor
0 commit comments