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
8b3f3c0b
Unverified
Commit
8b3f3c0b
authored
Jul 20, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the bug by the combination with `MRB_64BIT` and `MRB_INT32`.
Which is caused by `MRB_NAN_BOXING`.
parent
cf2aabda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
src/dump.c
src/dump.c
+9
-4
src/vm.c
src/vm.c
+7
-1
No files found.
src/dump.c
View file @
8b3f3c0b
...
...
@@ -934,14 +934,19 @@ dump_pool(mrb_state *mrb, const mrb_pool_value *p, FILE *fp)
{
if
(
p
->
tt
&
IREP_TT_NFLAG
)
{
/* number */
switch
(
p
->
tt
)
{
case
IREP_TT_INT32
:
fprintf
(
fp
,
"{IREP_TT_INT32, {.i32=%"
PRId32
"}},
\n
"
,
p
->
u
.
i32
);
break
;
#ifdef MRB_64BIT
case
IREP_TT_INT64
:
fprintf
(
fp
,
"{IREP_TT_INT64, {.i64=%"
PRId64
"}},
\n
"
,
p
->
u
.
i64
);
if
(
p
->
u
.
i64
<
INT32_MIN
||
INT32_MAX
<
p
->
u
.
i64
)
{
fprintf
(
fp
,
"{IREP_TT_INT64, {.i64=%"
PRId64
"}},
\n
"
,
p
->
u
.
i64
);
}
else
{
fprintf
(
fp
,
"{IREP_TT_INT32, {.i64=%"
PRId64
"}},
\n
"
,
p
->
u
.
i64
);
}
break
;
#endif
case
IREP_TT_INT32
:
fprintf
(
fp
,
"{IREP_TT_INT32, {.i32=%"
PRId32
"}},
\n
"
,
p
->
u
.
i32
);
break
;
case
IREP_TT_FLOAT
:
if
(
p
->
u
.
f
==
0
)
{
fprintf
(
fp
,
"{IREP_TT_FLOAT, {.f=%#.1f}},
\n
"
,
p
->
u
.
f
);
...
...
src/vm.c
View file @
8b3f3c0b
...
...
@@ -1018,10 +1018,16 @@ RETRY_TRY_BLOCK:
regs
[
a
]
=
mrb_fixnum_value
((
mrb_int
)
pool
[
b
].
u
.
i32
);
break
;
case
IREP_TT_INT64
:
#if defined(MRB_INT64)
&& defined(MRB_64BIT)
#if defined(MRB_INT64)
regs
[
a
]
=
mrb_fixnum_value
((
mrb_int
)
pool
[
b
].
u
.
i64
);
break
;
#else
#if defined(MRB_64BIT)
if
(
INT32_MIN
<=
pool
[
b
].
u
.
i64
&&
pool
[
b
].
u
.
i64
<=
INT32_MAX
)
{
regs
[
a
]
=
mrb_fixnum_value
((
mrb_int
)
pool
[
b
].
u
.
i64
);
break
;
}
#endif
{
mrb_value
exc
=
mrb_exc_new_str_lit
(
mrb
,
E_RUNTIME_ERROR
,
"integer overflow"
);
mrb_exc_set
(
mrb
,
exc
);
...
...
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