ruby-changes:51632
From: normal <ko1@a...>
Date: Wed, 4 Jul 2018 06:29:27 +0900 (JST)
Subject: [ruby-changes:51632] normal:r63844 (trunk): mjit.h: avoid signed pointer comparisons (fix for 32-bit)
normal 2018-07-04 06:29:18 +0900 (Wed, 04 Jul 2018) New Revision: 63844 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63844 Log: mjit.h: avoid signed pointer comparisons (fix for 32-bit) ptrdiff_t is a signed type, use uintptr_t instead for unsigned comparisons. Modified files: trunk/mjit.h Index: mjit.h =================================================================== --- mjit.h (revision 63843) +++ mjit.h (revision 63844) @@ -103,7 +103,7 @@ mjit_exec(rb_execution_context_t *ec) https://github.com/ruby/ruby/blob/trunk/mjit.h#L103 total_calls = ++body->total_calls; func = body->jit_func; - if (UNLIKELY((ptrdiff_t)func <= (ptrdiff_t)LAST_JIT_ISEQ_FUNC)) { + if (UNLIKELY((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC)) { switch ((enum rb_mjit_iseq_func)func) { case NOT_ADDED_JIT_ISEQ_FUNC: if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/