Closed bahnwaerter closed 1 year ago
The example does not quite show, what you want to change or do I missunderstand something here? The problematic example here would be assert(a)
, where a
is an array, right?
The example does not quite show, what you want to change or do I missunderstand something here? The problematic example here would be
assert(a)
, wherea
is an array, right?
Without the patch, Ultimate cannot handle CArray
s in boolean expressions. And yes, your problematic example will be covered as well. In this case, the assertion should always hold (what it indeed does).
So, we also crash on assert(a != b)
right now, or what is the behavior?
So, we also crash on
assert(a != b)
right now, or what is the behavior?
No, assume that a
and b
are valid terms (boolean expressions), then we only have problems if the string literal comes into play.
This patch fixes the
CArray
expression evaluation/conversion to a boolean value to allow aCArray
evaluation in a boolean expression:In this example, the
CArray
as part of the conjunction will be always evaluated with an address check (memory address ofCArray
!=NULL
) to the boolean valuetrue
since the address of the error message string literal can never beNULL
.