#14017 closed bug (duplicate)
PANIC: page fault, but interrupts were disabled
Reported by: | th-otto | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | Cc: | jua | |
Blocked By: | #14711 | Blocking: | |
Platform: | x86-64 |
Description
While trying to implement JIT in ARAnyM (https://github.com/aranym/aranym), i get the above mentioned panic message.
JIT compiled code in ARAnyM works by catching SIGSEGVs on I/O addresses that are deliberately marked as anonymous. To make this work, a signal handler is installed that takes the extra sigcontext_t and ucontext_t parameters. The handler then either emulates the faulting instruction (if it was a valid I/O address), or jumps back to the main execution loop. This approach currently works on linux, all flavours of BSD, macOS, Win32 etc. Porting that code to Haiku just required to take the different layout of the ucontext_t structure into account. However, when i run the executable, i enter KDL.
The attached small program illustrates the basics of how the code should work. That small program works as expected, though, and does not panic.
To reproduce the problem:
- clone the git repository https://github.com/aranym/aranym.git
- apply the small patch attached below (the configure script currently disables JIT configuration on Haiku, because of the crash)
- recreate the scripts, and configure for JIT: $ ./autogen.sh --prefix=/boot/system --disable-sdl2 --enable-jit-compiler
You will also need some TOS image to run aranym, otherwise it won't do anything. For legal reasons, it cannot be attached here, but EmuTOS (https://github.com/emutos/emutos/archive/VERSION_0_9_9_1.tar.gz) will do.
System was build from a nightly iso image a few days ago, updated to hrev51826. Compiler in use is GCC 5.4. All components were installed from HaikuDepot. The system runs in VirtualBox 5.2.6, on a linux host.
Attachments (3)
Change History (6)
by , 7 years ago
comment:1 by , 7 years ago
Cc: | added |
---|
Julian touched this kernel component recently, perhaps he might have some idea of what a fix would be?
comment:2 by , 6 years ago
Blocked By: | 14711 added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
comment:3 by , 5 years ago
Remove milestone for tickets with status = closed and resolution != fixed
Small sample code