blob: 4665dcb252bfdae400167c88216c50fd0dc3c440 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
The issue revolves around a misaligned stack address when handling signals in QEMU for x86_64 userspace. The problem occurs because the signal handler's stack pointer is not properly aligned according to the x86_64 ABI, leading to a crash due to an incorrect `movaps` instruction.
The key points from the bug report are:
1. **Problem**: Applications crash in signal handlers due to a misaligned stack address causing a `movaps` instruction to fail.
2. **Symptom**: The crash is reported as a NULL dereference, but GDB shows it's actually caused by a misaligned stack.
3. **Technical Detail**: The x86_64 psABI requires that the stack pointer (`%rsp`) be aligned to a 16-byte boundary when entering a function. However, QEMU's signal handling code does not ensure this alignment when transferring control to the signal handler.
4. **Relevant Code**: The problematic code in `signal.c` adjusts the stack pointer without properly aligning it for x86_64, leading to an unaligned address being used in the signal handler.
Given that the issue is related to incorrect handling of stack alignment during signal delivery in QEMU's runtime environment, the appropriate category is:
**runtime**
This classification fits because the error occurs dynamically during execution (at runtime) and is not directly tied to a specific instruction or system call but rather to how the runtime environment (QEMU) manages the stack for signal handlers.
|