mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: avoid signed pointer comparisons (fix for 32-bit)
ptrdiff_t is a signed type, use uintptr_t instead for unsigned comparisons. This is needed to allow MJIT tests to pass on 32-bit x86 GNU/Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65ab2ab1c0
commit
faba0ee1c1
1 changed files with 2 additions and 2 deletions
4
mjit.c
4
mjit.c
|
@ -946,7 +946,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ptrdiff_t)func > (ptrdiff_t)LAST_JIT_ISEQ_FUNC) {
|
if ((uintptr_t)func > (uintptr_t)LAST_JIT_ISEQ_FUNC) {
|
||||||
struct rb_mjit_unit_node *node = create_list_node(unit);
|
struct rb_mjit_unit_node *node = create_list_node(unit);
|
||||||
CRITICAL_SECTION_START(3, "end of jit");
|
CRITICAL_SECTION_START(3, "end of jit");
|
||||||
add_to_list(node, &active_units);
|
add_to_list(node, &active_units);
|
||||||
|
@ -1101,7 +1101,7 @@ mark_ec_units(rb_execution_context_t *ec)
|
||||||
const rb_control_frame_t *cfp;
|
const rb_control_frame_t *cfp;
|
||||||
rb_control_frame_t *last_cfp = ec->cfp;
|
rb_control_frame_t *last_cfp = ec->cfp;
|
||||||
const rb_control_frame_t *end_marker_cfp;
|
const rb_control_frame_t *end_marker_cfp;
|
||||||
ptrdiff_t i, size;
|
uintptr_t i, size;
|
||||||
|
|
||||||
if (ec->vm_stack == NULL)
|
if (ec->vm_stack == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue