summaryrefslogtreecommitdiff
path: root/mark.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-12-17 09:57:34 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-12-17 09:57:34 +0300
commit4493660411b96a156c4ff20f3162d4b0946c4697 (patch)
tree7477b36c0fa9c5fbd4743f29117c1902f17cc141 /mark.c
parent2b2b691b6676eb64db177dcd38b94b31ee45d0e0 (diff)
downloadbdwgc-4493660411b96a156c4ff20f3162d4b0946c4697.tar.gz
Workaround 'checking unsigned value is negative' code defect in mark_from
* mark.c (GC_mark_from): Replace (signed_word)descr<0 with (descr&SIGNB)!=0.
Diffstat (limited to 'mark.c')
-rw-r--r--mark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mark.c b/mark.c
index 6db0bb01..dec761b9 100644
--- a/mark.c
+++ b/mark.c
@@ -727,7 +727,7 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
descr &= ~GC_DS_TAGS;
credit -= WORDS_TO_BYTES(WORDSZ/2); /* guess */
while (descr != 0) {
- if ((signed_word)descr < 0) {
+ if ((descr & SIGNB) != 0) {
current = *(word *)current_p;
FIXUP_POINTER(current);
if (current >= (word)least_ha && current < (word)greatest_ha) {