Skip to content

Commit 55a2a2b

Browse files
committed
Report invalid-free that involves invalid memory accesses along the path as FALSE(valid-deref)
1 parent 0505c24 commit 55a2a2b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tool-wrapper.inc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,18 @@ parse_result()
5959
echo 'FALSE(valid-free)'
6060
elif tail -n 50 $LOG.ok | \
6161
grep -Eq "^(\[.*\] free argument has offset zero|[[:space:]]* free argument has offset zero$)" ; then
62-
echo 'FALSE(valid-free)'
62+
if tail -n 50 $LOG.ok | grep -Eq "^[[:space:]]+[a-zA-Z0-9_]+=INVALID" ; then
63+
echo 'FALSE(valid-deref)'
64+
else
65+
echo 'FALSE(valid-free)'
66+
fi
6367
elif tail -n 50 $LOG.ok | \
6468
grep -Eq "^(\[.*\] |[[:space:]]*)free argument (is|must be) dynamic object" ; then
65-
echo 'FALSE(valid-free)'
69+
if tail -n 50 $LOG.ok | grep -Eq "^[[:space:]]+[a-zA-Z0-9_]+=INVALID" ; then
70+
echo 'FALSE(valid-deref)'
71+
else
72+
echo 'FALSE(valid-free)'
73+
fi
6674
elif tail -n 50 $LOG.ok | \
6775
grep -Eq "^(\[.*\] |[[:space:]]*)arithmetic overflow on signed" ; then
6876
echo 'FALSE(no-overflow)'

0 commit comments

Comments
 (0)