mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add clang volatile fixes from FreeBSD and NetBSD.
Use volatile instead of optnone to avoid optimization which causes segmentation faults. Patch by Dimitry Andric. [ruby-core:78531] [Bug #13014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e8914fb351
commit
472959f9c2
7 changed files with 15 additions and 19 deletions
4
eval.c
4
eval.c
|
@ -813,7 +813,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
|
|||
{
|
||||
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;
|
||||
|
@ -879,7 +879,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue