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
1e87dfdf
Commit
1e87dfdf
authored
7 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The stack may be reallocated in the func call; fix #3560
parent
8d9d7c92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/vm.c
src/vm.c
+6
-2
No files found.
src/vm.c
View file @
1e87dfdf
...
@@ -1449,13 +1449,16 @@ RETRY_TRY_BLOCK:
...
@@ -1449,13 +1449,16 @@ RETRY_TRY_BLOCK:
mrb
->
c
->
stack
[
0
]
=
recv
;
mrb
->
c
->
stack
[
0
]
=
recv
;
if
(
MRB_PROC_CFUNC_P
(
m
))
{
if
(
MRB_PROC_CFUNC_P
(
m
))
{
mrb_value
v
;
if
(
n
==
CALL_MAXARGS
)
{
if
(
n
==
CALL_MAXARGS
)
{
ci
->
nregs
=
3
;
ci
->
nregs
=
3
;
}
}
else
{
else
{
ci
->
nregs
=
n
+
2
;
ci
->
nregs
=
n
+
2
;
}
}
mrb
->
c
->
stack
[
0
]
=
m
->
body
.
func
(
mrb
,
recv
);
v
=
m
->
body
.
func
(
mrb
,
recv
);
mrb
->
c
->
stack
[
0
]
=
v
;
mrb_gc_arena_restore
(
mrb
,
ai
);
mrb_gc_arena_restore
(
mrb
,
ai
);
if
(
mrb
->
exc
)
goto
L_RAISE
;
if
(
mrb
->
exc
)
goto
L_RAISE
;
/* pop stackpos */
/* pop stackpos */
...
@@ -1862,7 +1865,8 @@ RETRY_TRY_BLOCK:
...
@@ -1862,7 +1865,8 @@ RETRY_TRY_BLOCK:
value_move
(
mrb
->
c
->
stack
,
&
regs
[
a
],
ci
->
argc
+
1
);
value_move
(
mrb
->
c
->
stack
,
&
regs
[
a
],
ci
->
argc
+
1
);
if
(
MRB_PROC_CFUNC_P
(
m
))
{
if
(
MRB_PROC_CFUNC_P
(
m
))
{
mrb
->
c
->
stack
[
0
]
=
m
->
body
.
func
(
mrb
,
recv
);
mrb_value
v
=
m
->
body
.
func
(
mrb
,
recv
);
mrb
->
c
->
stack
[
0
]
=
v
;
mrb_gc_arena_restore
(
mrb
,
ai
);
mrb_gc_arena_restore
(
mrb
,
ai
);
goto
L_RETURN
;
goto
L_RETURN
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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