ruby-changes:69286
From: Jean <ko1@a...>
Date: Thu, 21 Oct 2021 08:23:19 +0900 (JST)
Subject: [ruby-changes:69286] 217f7cb16f (master): Include errno message in mmap failure output
https://git.ruby-lang.org/ruby.git/commit/?id=217f7cb16f From 217f7cb16fe466b8be3cdb969655b4512d5e95fa Mon Sep 17 00:00:00 2001 From: Jean Boussier <jean.boussier@g...> Date: Tue, 14 Sep 2021 10:31:34 +0200 Subject: Include errno message in mmap failure output It might help figure out why it is failing. --- yjit_asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yjit_asm.c b/yjit_asm.c index 31e1528ff0..4a296e314c 100644 --- a/yjit_asm.c +++ b/yjit_asm.c @@ -7,6 +7,7 @@ https://github.com/ruby/ruby/blob/trunk/yjit_asm.c#L7 #include <stdarg.h> #include <stdint.h> #include <assert.h> +#include <errno.h> // For mmapp(), sysconf() #ifndef _WIN32 @@ -203,7 +204,7 @@ uint8_t* alloc_exec_mem(uint32_t mem_size) https://github.com/ruby/ruby/blob/trunk/yjit_asm.c#L204 // Check that the memory mapping was successful if (mem_block == MAP_FAILED) { - fprintf(stderr, "mmap call failed\n"); + perror("mmap call failed"); exit(-1); } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/