diff options
author | Aaron Patterson <[email protected]> | 2021-10-20 12:42:40 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2021-10-20 15:06:40 -0700 |
commit | b0c3f18ec519d505527e1929e25ec264c831a89e (patch) | |
tree | ddc3cde1a16b5c906e407f3a40dc2f11a3b75574 /gc.c | |
parent | 030b1892d5cc6f4c14b08d67d4ee60c202edc183 (diff) |
Print errno when mprotect fails
Trying to figure out the problem on s390x.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4996
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4870,7 +4870,7 @@ lock_page_body(rb_objspace_t *objspace, struct heap_page_body *body) #else if (mprotect(body, HEAP_PAGE_SIZE, PROT_NONE)) { #endif - rb_bug("Couldn't protect page %p", (void *)body); + rb_bug("Couldn't protect page %p, errno: %s", (void *)body, strerror(errno)); } else { gc_report(5, objspace, "Protecting page in move %p\n", (void *)body); @@ -4887,7 +4887,7 @@ unlock_page_body(rb_objspace_t *objspace, struct heap_page_body *body) #else if (mprotect(body, HEAP_PAGE_SIZE, PROT_READ | PROT_WRITE)) { #endif - rb_bug("Couldn't unprotect page %p", (void *)body); + rb_bug("Couldn't unprotect page %p, errno: %s", (void *)body, strerror(errno)); } else { gc_report(5, objspace, "Unprotecting page in move %p\n", (void *)body); |