diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-09-05 00:45:41 +0300 |
---|---|---|
committer | Josh Peterson <joshuap@unity3d.com> | 2019-12-03 19:53:26 +0300 |
commit | ef0b12fb47c50db58ba80895f1a60ffc8caa7ab8 (patch) | |
tree | 2b1d27bb8a4f04583bd982dcf3805187beb867f7 | |
parent | 14de1320966a2f16ad6d6b0ddc3b869f7d890204 (diff) |
Really fix 'potential unsafe sign check of a bitwise operation' code defect
(fix of commit af00c4d)
* mark.c [!OS2] (GC_mark_from): Replace (signed_word)v>=0 to (v&SIGNB)==0
(anyway, the compiler generates the same code).
-rw-r--r-- | mark.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -664,7 +664,8 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, # ifdef OS2 /* Use untweaked version to circumvent compiler problem */ while ((word)mark_stack_top >= (word)mark_stack && credit >= 0) # else - while ((((ptr_t)mark_stack_top - (ptr_t)mark_stack) | credit) >= 0) + while (((((word)mark_stack_top - (word)mark_stack) | (word)credit) + & SIGNB) == 0) # endif { current_p = mark_stack_top -> mse_start; |