diff options
author | Noah Gibbs <noah.gibbs@shopify.com> | 2022-11-02 15:16:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 11:16:26 -0400 |
commit | ee7c031dc46b4e86f889b2f98cb479d79774a446 (patch) | |
tree | 2ec26290610a02f3d471f1d1712daba1991be921 /yjit.c | |
parent | 946bb34fb57b9588b93d8435c9a581d0c7ef0019 (diff) |
YJIT: don't show a full crash report if mmap is only out of memory (#6659)
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -307,6 +307,10 @@ rb_yjit_reserve_addr_space(uint32_t mem_size) // Check that the memory mapping was successful if (mem_block == MAP_FAILED) { perror("ruby: yjit: mmap:"); + if(errno == ENOMEM) { + // No crash report if it's only insufficient memory + exit(EXIT_FAILURE); + } rb_bug("mmap failed"); } |