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
94bcdca6
Commit
94bcdca6
authored
7 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VM stack may be reallocated in `mrb_convert_type()`; fix #3622
parent
262fbaf5
No related merge requests found
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 @
94bcdca6
...
@@ -1244,7 +1244,8 @@ RETRY_TRY_BLOCK:
...
@@ -1244,7 +1244,8 @@ RETRY_TRY_BLOCK:
stack_extend
(
mrb
,
bidx
+
1
);
stack_extend
(
mrb
,
bidx
+
1
);
mrb
->
c
->
ci
->
nregs
=
bidx
+
1
;
mrb
->
c
->
ci
->
nregs
=
bidx
+
1
;
}
}
regs
[
bidx
]
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
result
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
regs
[
bidx
]
=
result
;
}
}
}
}
c
=
mrb_class
(
mrb
,
recv
);
c
=
mrb_class
(
mrb
,
recv
);
...
@@ -1468,11 +1469,14 @@ RETRY_TRY_BLOCK:
...
@@ -1468,11 +1469,14 @@ RETRY_TRY_BLOCK:
}
}
blk
=
regs
[
bidx
];
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
mrb_value
result
;
if
(
bidx
>=
ci
->
nregs
)
{
if
(
bidx
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
bidx
+
1
);
stack_extend
(
mrb
,
bidx
+
1
);
ci
->
nregs
=
bidx
+
1
;
ci
->
nregs
=
bidx
+
1
;
}
}
regs
[
bidx
]
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
result
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
regs
[
bidx
]
=
result
;
}
}
/* push callinfo */
/* push callinfo */
...
...
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