aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Gibbs <noah.gibbs@shopify.com>2022-11-02 15:16:26 +0000
committerGitHub <noreply@github.com>2022-11-02 11:16:26 -0400
commitee7c031dc46b4e86f889b2f98cb479d79774a446 (patch)
tree2ec26290610a02f3d471f1d1712daba1991be921
parent946bb34fb57b9588b93d8435c9a581d0c7ef0019 (diff)
downloadruby-ee7c031dc46b4e86f889b2f98cb479d79774a446.tar.gz
YJIT: don't show a full crash report if mmap is only out of memory (#6659)
-rw-r--r--yjit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index d7f369ca2e..1694e1edd7 100644
--- a/yjit.c
+++ b/yjit.c
@@ -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");
}