From ee7c031dc46b4e86f889b2f98cb479d79774a446 Mon Sep 17 00:00:00 2001 From: Noah Gibbs Date: Wed, 2 Nov 2022 15:16:26 +0000 Subject: YJIT: don't show a full crash report if mmap is only out of memory (#6659) --- yjit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yjit.c') 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"); } -- cgit v1.2.1