Skip to content

Add KNOWNBUG regression test for GH issue #4168 #4174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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);
}
Original file line number Diff line number Diff line change
@@ -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