diff options
author | joerg <joerg@pkgsrc.org> | 2015-11-20 14:31:59 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-11-20 14:31:59 +0000 |
commit | 20b63c59cfc19582de08a3683d97d5b93f7e0c74 (patch) | |
tree | cdbfff3f470fabb3a1cc00e1cfb3675e601cc36b /lang | |
parent | 3bd87da1254293cec5a332a1bbb87b394a6363b8 (diff) | |
download | pkgsrc-20b63c59cfc19582de08a3683d97d5b93f7e0c74.tar.gz |
Mark a few more variables as volatile to prevent clobbering by setjmp.
Found due to crashes with very recent clang. Bump revision.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ruby21-base/Makefile | 3 | ||||
-rw-r--r-- | lang/ruby21-base/distinfo | 7 | ||||
-rw-r--r-- | lang/ruby21-base/patches/patch-eval.c | 22 | ||||
-rw-r--r-- | lang/ruby21-base/patches/patch-eval__error.c | 17 | ||||
-rw-r--r-- | lang/ruby21-base/patches/patch-thread.c | 15 | ||||
-rw-r--r-- | lang/ruby21-base/patches/patch-vm__eval.c | 33 | ||||
-rw-r--r-- | lang/ruby21-base/patches/patch-vm__trace.c | 13 | ||||
-rw-r--r-- | lang/ruby22-base/Makefile | 3 | ||||
-rw-r--r-- | lang/ruby22-base/distinfo | 7 | ||||
-rw-r--r-- | lang/ruby22-base/patches/patch-eval.c | 22 | ||||
-rw-r--r-- | lang/ruby22-base/patches/patch-eval__error.c | 17 | ||||
-rw-r--r-- | lang/ruby22-base/patches/patch-thread.c | 15 | ||||
-rw-r--r-- | lang/ruby22-base/patches/patch-vm__eval.c | 33 | ||||
-rw-r--r-- | lang/ruby22-base/patches/patch-vm__trace.c | 13 |
14 files changed, 216 insertions, 4 deletions
diff --git a/lang/ruby21-base/Makefile b/lang/ruby21-base/Makefile index eea042e03b7..1a69c1a3ab2 100644 --- a/lang/ruby21-base/Makefile +++ b/lang/ruby21-base/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.16 2015/10/14 18:38:00 sevan Exp $ +# $NetBSD: Makefile,v 1.17 2015/11/20 14:31:59 joerg Exp $ # DISTNAME= ${RUBY_DISTNAME} PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL} +PKGREVISION= 1 CATEGORIES= lang ruby MASTER_SITES= ${MASTER_SITE_RUBY} diff --git a/lang/ruby21-base/distinfo b/lang/ruby21-base/distinfo index 51f84e906af..c9c2c43aa2a 100644 --- a/lang/ruby21-base/distinfo +++ b/lang/ruby21-base/distinfo @@ -1,10 +1,12 @@ -$NetBSD: distinfo,v 1.21 2015/11/03 22:50:43 agc Exp $ +$NetBSD: distinfo,v 1.22 2015/11/20 14:31:59 joerg Exp $ SHA1 (ruby-2.1.7.tar.bz2) = 9c2d3c73b3d2aed2c8f018d3a27e970846dcf143 RMD160 (ruby-2.1.7.tar.bz2) = 1fb05a54d255cf3ef3b9933412e935b780ff3258 SHA512 (ruby-2.1.7.tar.bz2) = f610d2dd6a93f0a5e84e04ddedf847bbcea5dd3289b3164cdf60be64f67a80dfd5f9836ea5d169970cd0ce24a7e05ea6190699706567cb0d5cf450de6a70e445 Size (ruby-2.1.7.tar.bz2) = 12019706 bytes SHA1 (patch-configure) = 7f1f6d2dc7d32c96d6ae65562a9bc6d50d2b79dd +SHA1 (patch-eval.c) = a1e86d4ed1729398393e83d519e991259c6163de +SHA1 (patch-eval__error.c) = cc313587bb24e16e4702f784b30e64618ae3f5a4 SHA1 (patch-ext_dbm_extconf.rb) = 08520edd956e17cb6cc80b6ee2c77af77a834bd2 SHA1 (patch-ext_opennsl_extconf.rb) = 3c5985ee4b6df6616e597a98e77c519eaaf9c90b SHA1 (patch-ext_opennsl_ossl_ssl.c) = d803735371af6a17be5c465a28c05fabca9463f5 @@ -35,4 +37,7 @@ SHA1 (patch-man_ri.1) = af855135020f18c361cc55af676adc75e26bf4d3 SHA1 (patch-man_ruby.1) = 5bc1e2e7c4c640659e33d0131d0982ce4e0d9fe0 SHA1 (patch-template_verconf.h.in) = 1f4c0676d1335a9fc32ccf8cbfa41678dde96dcd SHA1 (patch-test_rubygems_test__gem.rb) = 4d8cc50c2782e29eefea0ea6deedf295a7f09bc2 +SHA1 (patch-thread.c) = 93bba713014dfb92a59ba9715f50f23c5329de6a SHA1 (patch-tool_rbinstall.rb) = 845e5136dc2b5e3c41aeb833890e786544d6f5d5 +SHA1 (patch-vm__eval.c) = b0739a5e64f99ce3adb86d7d676759cbc3aa7b1b +SHA1 (patch-vm__trace.c) = 8e992c214b69c6237d4c4418aaba892079f9873e diff --git a/lang/ruby21-base/patches/patch-eval.c b/lang/ruby21-base/patches/patch-eval.c new file mode 100644 index 00000000000..4659f5d1d0a --- /dev/null +++ b/lang/ruby21-base/patches/patch-eval.c @@ -0,0 +1,22 @@ +$NetBSD: patch-eval.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- eval.c.orig 2015-11-16 14:50:49.000000000 +0000 ++++ eval.c +@@ -743,7 +743,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V + { + int state; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t *volatile cfp = th->cfp; + volatile VALUE result = Qfalse; + volatile VALUE e_info = th->errinfo; + va_list args; +@@ -809,7 +809,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE + volatile VALUE result = Qnil; + volatile int status; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t * volatile cfp = th->cfp; + struct rb_vm_protect_tag protect_tag; + rb_jmpbuf_t org_jmpbuf; + diff --git a/lang/ruby21-base/patches/patch-eval__error.c b/lang/ruby21-base/patches/patch-eval__error.c new file mode 100644 index 00000000000..e8b153ecd70 --- /dev/null +++ b/lang/ruby21-base/patches/patch-eval__error.c @@ -0,0 +1,17 @@ +$NetBSD: patch-eval__error.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- eval_error.c.orig 2015-11-16 15:02:19.000000000 +0000 ++++ eval_error.c +@@ -80,9 +80,9 @@ static void + error_print(void) + { + volatile VALUE errat = Qundef; +- rb_thread_t *th = GET_THREAD(); +- VALUE errinfo = th->errinfo; +- int raised_flag = th->raised_flag; ++ rb_thread_t * volatile th = GET_THREAD(); ++ volatile VALUE errinfo = th->errinfo; ++ volatile int raised_flag = th->raised_flag; + volatile VALUE eclass = Qundef, e = Qundef; + const char *volatile einfo; + volatile long elen; diff --git a/lang/ruby21-base/patches/patch-thread.c b/lang/ruby21-base/patches/patch-thread.c new file mode 100644 index 00000000000..8da76ea895d --- /dev/null +++ b/lang/ruby21-base/patches/patch-thread.c @@ -0,0 +1,15 @@ +$NetBSD: patch-thread.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- thread.c.orig 2015-11-16 15:03:41.000000000 +0000 ++++ thread.c +@@ -420,8 +420,8 @@ rb_threadptr_unlock_all_locking_mutexes( + void + rb_thread_terminate_all(void) + { +- rb_thread_t *th = GET_THREAD(); /* main thread */ +- rb_vm_t *vm = th->vm; ++ rb_thread_t *volatile th = GET_THREAD(); /* main thread */ ++ rb_vm_t *volatile vm = th->vm; + + if (vm->main_thread != th) { + rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)", diff --git a/lang/ruby21-base/patches/patch-vm__eval.c b/lang/ruby21-base/patches/patch-vm__eval.c new file mode 100644 index 00000000000..62ba5170ac5 --- /dev/null +++ b/lang/ruby21-base/patches/patch-vm__eval.c @@ -0,0 +1,33 @@ +$NetBSD: patch-vm__eval.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- vm_eval.c.orig 2015-11-16 14:55:47.000000000 +0000 ++++ vm_eval.c +@@ -1062,7 +1062,7 @@ rb_iterate(VALUE (* it_proc) (VALUE), VA + int state; + volatile VALUE retval = Qnil; + NODE *node = NEW_IFUNC(bl_proc, data2); +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t * volatile th = GET_THREAD(); + rb_control_frame_t *volatile cfp = th->cfp; + + node->nd_aid = rb_frame_this_func(); +@@ -1190,7 +1190,7 @@ eval_string_with_cref(VALUE self, VALUE + int state; + VALUE result = Qundef; + VALUE envval; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t *volatile th = GET_THREAD(); + rb_env_t *env = NULL; + rb_block_t block, *base_block; + volatile int parse_in_eval; +@@ -1843,8 +1843,8 @@ rb_catch_protect(VALUE t, rb_block_call_ + { + int state; + volatile VALUE val = Qnil; /* OK */ +- rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *saved_cfp = th->cfp; ++ rb_thread_t * volatile th = GET_THREAD(); ++ rb_control_frame_t * volatile saved_cfp = th->cfp; + volatile VALUE tag = t; + + TH_PUSH_TAG(th); diff --git a/lang/ruby21-base/patches/patch-vm__trace.c b/lang/ruby21-base/patches/patch-vm__trace.c new file mode 100644 index 00000000000..e56c70e7f84 --- /dev/null +++ b/lang/ruby21-base/patches/patch-vm__trace.c @@ -0,0 +1,13 @@ +$NetBSD: patch-vm__trace.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- vm_trace.c.orig 2015-11-16 15:02:00.000000000 +0000 ++++ vm_trace.c +@@ -390,7 +390,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE) + volatile int raised; + volatile int outer_state; + VALUE result = Qnil; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t * volatile th = GET_THREAD(); + int state; + const int tracing = th->trace_arg ? 1 : 0; + rb_trace_arg_t dummy_trace_arg; diff --git a/lang/ruby22-base/Makefile b/lang/ruby22-base/Makefile index a1e1d79b658..0229a706176 100644 --- a/lang/ruby22-base/Makefile +++ b/lang/ruby22-base/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.5 2015/10/14 18:38:57 sevan Exp $ +# $NetBSD: Makefile,v 1.6 2015/11/20 14:31:59 joerg Exp $ # DISTNAME= ${RUBY_DISTNAME} PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL} +PKGREVISION= 1 CATEGORIES= lang ruby MASTER_SITES= ${MASTER_SITE_RUBY} diff --git a/lang/ruby22-base/distinfo b/lang/ruby22-base/distinfo index 659f2b5fb84..a4a0cb339f1 100644 --- a/lang/ruby22-base/distinfo +++ b/lang/ruby22-base/distinfo @@ -1,10 +1,12 @@ -$NetBSD: distinfo,v 1.9 2015/11/03 22:50:43 agc Exp $ +$NetBSD: distinfo,v 1.10 2015/11/20 14:31:59 joerg Exp $ SHA1 (ruby-2.2.3.tar.bz2) = 59fe80aeeb518ffb396bb1df74b47b25541fb207 RMD160 (ruby-2.2.3.tar.bz2) = 048769272df86969a6848234bc3a1a1968a6e47c SHA512 (ruby-2.2.3.tar.bz2) = 795f1b66a6d4f0baef897068899c3a1a4370ce1268618e6a7d6d4720234444259f371d1ba2e174b2f7580265e9f18eda3f295fbb087447aa6e8fb7a0f07526ce Size (ruby-2.2.3.tar.bz2) = 13333814 bytes SHA1 (patch-configure) = 8abbc486b8cf30bb789ef58d1cb289191dcd1af6 +SHA1 (patch-eval.c) = a1e86d4ed1729398393e83d519e991259c6163de +SHA1 (patch-eval__error.c) = cc313587bb24e16e4702f784b30e64618ae3f5a4 SHA1 (patch-ext_dbm_extconf.rb) = ee932265052613d458375ad1a760a09fefb9d959 SHA1 (patch-ext_openssl_extconf.rb) = 27ecb02b9912fc24b6fadd2b2012c16a85729430 SHA1 (patch-ext_openssl_ssl.c) = fb83697153a262112826018c3d6a27e8115573be @@ -23,4 +25,7 @@ SHA1 (patch-man_irb.1) = 2bf807b4c1b1c68d1f518caa054cfd900e0fedb7 SHA1 (patch-man_ri.1) = b07be05375977cfac0f88765a95e85db4f858885 SHA1 (patch-man_ruby.1) = 88ca6703fd58a89726618ca7dfc7912bad312b1c SHA1 (patch-test_rubygems_test__gem.rb) = 01a36c32e49d518cc68bea5e76c7640451223b61 +SHA1 (patch-thread.c) = 93bba713014dfb92a59ba9715f50f23c5329de6a SHA1 (patch-tool_rbinstall.rb) = 2bb27173a0e08de94391d56ef2b366a71ee2dc50 +SHA1 (patch-vm__eval.c) = b0739a5e64f99ce3adb86d7d676759cbc3aa7b1b +SHA1 (patch-vm__trace.c) = 8e992c214b69c6237d4c4418aaba892079f9873e diff --git a/lang/ruby22-base/patches/patch-eval.c b/lang/ruby22-base/patches/patch-eval.c new file mode 100644 index 00000000000..4659f5d1d0a --- /dev/null +++ b/lang/ruby22-base/patches/patch-eval.c @@ -0,0 +1,22 @@ +$NetBSD: patch-eval.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- eval.c.orig 2015-11-16 14:50:49.000000000 +0000 ++++ eval.c +@@ -743,7 +743,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V + { + int state; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t *volatile cfp = th->cfp; + volatile VALUE result = Qfalse; + volatile VALUE e_info = th->errinfo; + va_list args; +@@ -809,7 +809,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE + volatile VALUE result = Qnil; + volatile int status; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t * volatile cfp = th->cfp; + struct rb_vm_protect_tag protect_tag; + rb_jmpbuf_t org_jmpbuf; + diff --git a/lang/ruby22-base/patches/patch-eval__error.c b/lang/ruby22-base/patches/patch-eval__error.c new file mode 100644 index 00000000000..e8b153ecd70 --- /dev/null +++ b/lang/ruby22-base/patches/patch-eval__error.c @@ -0,0 +1,17 @@ +$NetBSD: patch-eval__error.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- eval_error.c.orig 2015-11-16 15:02:19.000000000 +0000 ++++ eval_error.c +@@ -80,9 +80,9 @@ static void + error_print(void) + { + volatile VALUE errat = Qundef; +- rb_thread_t *th = GET_THREAD(); +- VALUE errinfo = th->errinfo; +- int raised_flag = th->raised_flag; ++ rb_thread_t * volatile th = GET_THREAD(); ++ volatile VALUE errinfo = th->errinfo; ++ volatile int raised_flag = th->raised_flag; + volatile VALUE eclass = Qundef, e = Qundef; + const char *volatile einfo; + volatile long elen; diff --git a/lang/ruby22-base/patches/patch-thread.c b/lang/ruby22-base/patches/patch-thread.c new file mode 100644 index 00000000000..8da76ea895d --- /dev/null +++ b/lang/ruby22-base/patches/patch-thread.c @@ -0,0 +1,15 @@ +$NetBSD: patch-thread.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- thread.c.orig 2015-11-16 15:03:41.000000000 +0000 ++++ thread.c +@@ -420,8 +420,8 @@ rb_threadptr_unlock_all_locking_mutexes( + void + rb_thread_terminate_all(void) + { +- rb_thread_t *th = GET_THREAD(); /* main thread */ +- rb_vm_t *vm = th->vm; ++ rb_thread_t *volatile th = GET_THREAD(); /* main thread */ ++ rb_vm_t *volatile vm = th->vm; + + if (vm->main_thread != th) { + rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)", diff --git a/lang/ruby22-base/patches/patch-vm__eval.c b/lang/ruby22-base/patches/patch-vm__eval.c new file mode 100644 index 00000000000..62ba5170ac5 --- /dev/null +++ b/lang/ruby22-base/patches/patch-vm__eval.c @@ -0,0 +1,33 @@ +$NetBSD: patch-vm__eval.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- vm_eval.c.orig 2015-11-16 14:55:47.000000000 +0000 ++++ vm_eval.c +@@ -1062,7 +1062,7 @@ rb_iterate(VALUE (* it_proc) (VALUE), VA + int state; + volatile VALUE retval = Qnil; + NODE *node = NEW_IFUNC(bl_proc, data2); +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t * volatile th = GET_THREAD(); + rb_control_frame_t *volatile cfp = th->cfp; + + node->nd_aid = rb_frame_this_func(); +@@ -1190,7 +1190,7 @@ eval_string_with_cref(VALUE self, VALUE + int state; + VALUE result = Qundef; + VALUE envval; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t *volatile th = GET_THREAD(); + rb_env_t *env = NULL; + rb_block_t block, *base_block; + volatile int parse_in_eval; +@@ -1843,8 +1843,8 @@ rb_catch_protect(VALUE t, rb_block_call_ + { + int state; + volatile VALUE val = Qnil; /* OK */ +- rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *saved_cfp = th->cfp; ++ rb_thread_t * volatile th = GET_THREAD(); ++ rb_control_frame_t * volatile saved_cfp = th->cfp; + volatile VALUE tag = t; + + TH_PUSH_TAG(th); diff --git a/lang/ruby22-base/patches/patch-vm__trace.c b/lang/ruby22-base/patches/patch-vm__trace.c new file mode 100644 index 00000000000..e56c70e7f84 --- /dev/null +++ b/lang/ruby22-base/patches/patch-vm__trace.c @@ -0,0 +1,13 @@ +$NetBSD: patch-vm__trace.c,v 1.1 2015/11/20 14:31:59 joerg Exp $ + +--- vm_trace.c.orig 2015-11-16 15:02:00.000000000 +0000 ++++ vm_trace.c +@@ -390,7 +390,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE) + volatile int raised; + volatile int outer_state; + VALUE result = Qnil; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t * volatile th = GET_THREAD(); + int state; + const int tracing = th->trace_arg ? 1 : 0; + rb_trace_arg_t dummy_trace_arg; |