YJIT: don't show a full crash report if mmap is only out of memory (#6659)
This commit is contained in:
parent
946bb34fb5
commit
ee7c031dc4
Notes:
git
2022-11-02 15:16:46 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
4
yjit.c
4
yjit.c
@ -307,6 +307,10 @@ rb_yjit_reserve_addr_space(uint32_t mem_size)
|
|||||||
// Check that the memory mapping was successful
|
// Check that the memory mapping was successful
|
||||||
if (mem_block == MAP_FAILED) {
|
if (mem_block == MAP_FAILED) {
|
||||||
perror("ruby: yjit: mmap:");
|
perror("ruby: yjit: mmap:");
|
||||||
|
if(errno == ENOMEM) {
|
||||||
|
// No crash report if it's only insufficient memory
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
rb_bug("mmap failed");
|
rb_bug("mmap failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user