Merge pull request #4174 from hannes-steffenhagen-diffblue/regression-add_nullpointer_regression_test

Add KNOWNBUG regression test for GH issue #4168
This commit is contained in:
Michael Tautschnig 2019-02-13 12:16:09 +00:00 committed by GitHub
commit 512b6b7ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#include <assert.h>
#include <stddef.h>
struct linked_list
{
struct linked_list *next;
};
int main(void)
{
size_t list_sz = 8ul;
assert(list_sz == sizeof(struct linked_list));
struct linked_list *list = malloc(list_sz);
// this line makes symex crash for some reason
// last known to work on 9cf2bfb3e458d419d842a0e1fd26fb1748451851
// (no bisection has been done yet to narrow down the source of the error)
list->next = (struct linked_list *)0;
assert(!list->next);
}

View File

@ -0,0 +1,10 @@
KNOWNBUG
main.c
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring
--
This tests for the regression described in https://github.com/diffblue/cbmc/issues/4168