Skip to content

Delivery of "synchronous" signals in preload mode (SIGSEGV, SIGILL) #2091

@sporksmith

Description

@sporksmith

In preload mode, we emulate sigaction, which prevents handlers from being installed natively. While we implement delivery of signals to those handlers for signals arriving via syscalls, we do not arrange to propagate signals that the host OS raises. e.g. if the managed thread executes an illegal instruction, the host Linux kernel will raise a native SIGILL, which will be delivered natively, killing the process. This is usually what would happen anyway, but a signal handler installed by the managed process to catch and "swallow" the SIGILL won't be invoked.

This is probably more common for SIGSEGV, where the signal handler might allocate memory or call mprotect to make the original access legal, and then return instead of crashing. This case is also slightly further complicated because in preload mode we do install our own SIGSEGV handler, but it only handles SIGSEGV's that were raised from executing RDTSC, and crashes on any other SIGSEGV without delegating to a signal handler that the managed process may have installed.

This issue appears to affect OpenJDK. #2084

Metadata

Metadata

Assignees

Labels

Type: BugError or flaw producing unexpected results

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions