diff --git a/UndefinedBehaviour.suppress.in b/UndefinedBehaviour.suppress.in index 4715737032..7606289fcf 100644 --- a/UndefinedBehaviour.suppress.in +++ b/UndefinedBehaviour.suppress.in @@ -1,9 +1,6 @@ # -# These are errors that need to be taken care of, but in the sprit of -# "Put Your Own Oxygen Mask on First", we provide here a suppression list for -# _external_ sources. +# Suppress errors that are recognized but fix is considered beyond the scope of this project. +# (e.g. in external source). # - -# external/picosat/picosat.c:3432:33: runtime error: applying non-zero offset 8 to null pointer -# +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior external/picosat/picosat.c:3432:33 -pointer-overflow:picosat.c \ No newline at end of file +# For syntax see: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#issue-suppression +# \ No newline at end of file diff --git a/external/picosat/picosat.c b/external/picosat/picosat.c index a007afc9b1..cfff05a166 100644 --- a/external/picosat/picosat.c +++ b/external/picosat/picosat.c @@ -3429,7 +3429,10 @@ satisfied (PS * ps) return 0; assert (!ps->conflict); assert (bcp_queue_is_empty (ps)); - return ps->thead == ps->trail + ps->max_var; /* all assigned */ + // return ps->thead == ps->trail + ps->max_var; + + return (ps->thead == ps->trail && 0 == ps->max_var) + || (ps->thead && ps->trail && ps->thead == ps->trail + ps->max_var); /* all assigned */ } static void