I analyze FreePascal exceptions handling. To study it, I wrote units with functions fpc_NNN and not use try-except-finally. It catches raised software exceptions. But I want also to catch hardware exceptions. In procedure Exe_entry is install_exception_handlers. It install syswin32_i386_exception_handler by SetUnhandledExceptionFilter.
But is problem: function (in system.pp) syswin32_i386_exception_handler compares: "if excep^.ContextRecord^.SegSs = _SS then". _SS is stack segment of program, but in ContextRecord^.SegSs is strange value.