-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In Python/perf_jit_trampoline.c, the perf_map_jit_init function checks for NULL to detect mmap failures, but mmap() returns MAP_FAILED (which is (void*)-1) on error, not NULL.
cpython/Python/perf_jit_trampoline.c
Line 1086 in 25a10b6
| if (perf_jit_map_state.mapped_buffer == NULL) { |
This means mmap failures are never detected, and jitdump initialization proceeds with an invalid pointer.
CPython versions tested on:
CPython main branch, 3.15, 3.14, 3.13
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error