From 9c3153e0da991e1a7df9b4cf91d6830effc79b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 10 Oct 2019 11:55:43 +0900 Subject: allow rb_raise from outside of GVL Now that allocation routines like ALLOC_N() can raise exceptions on integer overflows. This is a problem when the calling thread has no GVL. Memory allocations has been allowed without it, but can still fail. Let's just relax rb_raise's restriction so that we can call it with or without GVL. With GVL the behaviour is unchanged. With no GVL, wait for it. Also, integer overflows can theoretically occur during GC when we expand the object space. We cannot do so much then. Call rb_memerror and let that routine abort the process. --- common.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'common.mk') diff --git a/common.mk b/common.mk index ff56a0c93f..236d40ed04 100644 --- a/common.mk +++ b/common.mk @@ -1942,6 +1942,7 @@ error.$(OBJEXT): $(CCAN_DIR)/list/list.h error.$(OBJEXT): $(CCAN_DIR)/str/str.h error.$(OBJEXT): $(hdrdir)/ruby.h error.$(OBJEXT): $(hdrdir)/ruby/ruby.h +error.$(OBJEXT): $(hdrdir)/ruby/thread.h error.$(OBJEXT): {$(VPATH)}assert.h error.$(OBJEXT): {$(VPATH)}config.h error.$(OBJEXT): {$(VPATH)}defines.h -- cgit v1.2.3