|
From: David K. <dw...@de...> - 2006-04-30 20:35:52
|
> > The fact that valgrind currently behaves different to the OS here > > is arguably a bug. ok, sounds like the current handling of 'int' in=20 priv/guest-x86/toIR.c:10895 could use some fixing. At present if the operand is anything other than 0x80 we trigger a decode failure which ultimately results in SIGILL. Rather than decode failure, perhaps we want the instruction executed and then let the kernel handle it as it wants. The difference between 'int 0x80' and 'int N' where N !=3D 0x80 is we won't validate arguments when N !=3D 0x80, at least. > Yes. It worked (raised the signal) in 2.4.0, but got broken when the JIT > was rewritten in 3.0.0. The 'int' instruction is used legitimately by at > least one JVM for throwing exceptions. So we'd like to see SIGSEGV, or really whatever the kernel would generate in this case if the program was not running under valgrind?=20 Do we want valgrind to raise the SIGSEGV, or the kernel? Probably the kernel since: - this is an interrupt in any case so control should pass to the kernel - we don't need to know the details about what the kernel would do if we just let the kernel do it |
|
From: Tom H. <to...@co...> - 2006-04-30 22:10:12
|
In message <2f7...@ma...>
"David Kimdon" <dw...@de...> wrote:
> > Yes. It worked (raised the signal) in 2.4.0, but got broken when the JIT
> > was rewritten in 3.0.0. The 'int' instruction is used legitimately by at
> > least one JVM for throwing exceptions.
>
> So we'd like to see SIGSEGV, or really whatever the kernel would
> generate in this case if the program was not running under valgrind?
> Do we want valgrind to raise the SIGSEGV, or the kernel? Probably the
> kernel since:
>
> - this is an interrupt in any case so control should pass to the kernel
> - we don't need to know the details about what the kernel would do if
> we just let the kernel do it
There's no sensible way to get the kernel to generate it so valgrind
should - the code to synthesise signals is all there in the core. If
you look at 2.4.x you should be able to see how it used to work.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|