jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

remove inline assembler in exception handling for Nt #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
emu/Nt/os.c should use structured exception handling in tramp. we didn't do
that originally because we had trouble with older Windows, but that should
no longer be a problem.

Original issue reported on code.google.com by Charles....@gmail.com on 5 Feb 2010 at 3:28

GoogleCodeExporter commented 9 years ago

Original comment by Charles....@gmail.com on 12 Feb 2010 at 2:06

GoogleCodeExporter commented 9 years ago

Original comment by Charles....@gmail.com on 12 Feb 2010 at 2:07

GoogleCodeExporter commented 9 years ago

Original comment by Charles....@gmail.com on 14 Jul 2010 at 9:39

GoogleCodeExporter commented 9 years ago
of course, having looked at it more closely, it's really more than 
"portability".
the tricky bit is that we don't want control to be transferred to a catch-all 
exception handler at the top of the stack, popping the stack. otherwise we 
could just use the normal Windows C/C++ syntax. instead we want to keep the 
stack
just below the point of failure, and change the state only just enough to
invoke the Dis exception handling code at that point. on other platforms,
the signal handler can call disfault, which will eventually do an error/longjmp
to pop the stack itself. here, it apparently has to return through
the Windows exception handler, presumably because it has its own state to 
remove.

Original comment by Charles....@gmail.com on 11 Aug 2010 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by Charles....@gmail.com on 11 Aug 2010 at 4:58

GoogleCodeExporter commented 9 years ago
i've given someone a test version of os.c to try, that reverts to the earlier 
and portable - within Windows - use of SetUnhandledExceptionFilter. see the 
sflag == 0 test. if that seems fine, we'll proceed to use that once more, with 
any extra changes needed to fix up the floating-point state on fp traps.

Original comment by Charles....@gmail.com on 11 Aug 2010 at 5:30

GoogleCodeExporter commented 9 years ago
CHANGES
emu/Nt/os.c
include/version.h
mkfiles/mkfile-Linux-386
committed changeset 461:d8cf126ad631
pushing to https://Charles.Forsyth:***@inferno-os.googlecode.com/hg
searching for changes
1 changesets found

Original comment by Charles....@gmail.com on 14 Sep 2010 at 12:24