Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
2adb0c20
Commit
2adb0c20
authored
Aug 18, 2017
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Aug 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3786 from christopheraue/3784_fix
Reset ci in OP_SUPER after potential realloc
parents
11c3ad99
6b0860ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/vm.c
src/vm.c
+6
-5
No files found.
src/vm.c
View file @
2adb0c20
...
...
@@ -1333,7 +1333,7 @@ RETRY_TRY_BLOCK:
int
bidx
=
(
argc
<
0
)
?
a
+
2
:
a
+
n
+
1
;
struct
RProc
*
m
;
struct
RClass
*
c
;
mrb_callinfo
*
ci
=
mrb
->
c
->
ci
;
mrb_callinfo
*
ci
;
mrb_value
recv
,
blk
;
mrb_sym
mid
=
syms
[
GETARG_B
(
i
)];
...
...
@@ -1345,9 +1345,9 @@ RETRY_TRY_BLOCK:
else
{
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
/* store the converted proc not directly in the stack because the stack
might have been reallocated during mrb_convert_type(), see #3622 */
blk
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
/* The stack might have been reallocated during mrb_convert_type(),
see #3622 */
regs
[
bidx
]
=
blk
;
}
}
...
...
@@ -1531,10 +1531,11 @@ RETRY_TRY_BLOCK:
recv
=
regs
[
0
];
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
/* store the converted proc not directly in the stack because the stack
might have been reallocated during mrb_convert_type(), see #3622 */
blk
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
/* The stack or ci stack might have been reallocated during
mrb_convert_type(), see #3622 and #3784 */
regs
[
bidx
]
=
blk
;
ci
=
mrb
->
c
->
ci
;
}
c
=
ci
->
target_class
->
super
;
m
=
mrb_method_search_vm
(
mrb
,
&
c
,
mid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment