Skip to content

Regression: CBMC crashes because it passes the string "NULL" get_bvrep_bit during symex #4168

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

Closed
hannes-steffenhagen-diffblue opened this issue Feb 12, 2019 · 0 comments · Fixed by #4211

Comments

@hannes-steffenhagen-diffblue
Copy link
Contributor

Observed on: 3b7d59a
Still working on: 9cf2bfb

(approximate range, haven't bisected yet)

CBMC fails with:

Invariant check failed
File: ../src/util/arith_tools.cpp:305 function: get_bvrep_bit
Condition: isdigit(nibble) || (nibble >= 'A' && nibble <= 'F')
Reason: bvrep is hexadecimal, upper-case

For some reason the src parameter ends up being the string "NULL" when running cbmc against the following example:

#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);
  list->next = (struct linked_list *)0;
}

This does not happen when 8ul above is replaced with sizeof(struct linked_list). It also didn't happen last year, so was presumably caused by some of the recent refactoring work.

hannes-steffenhagen-diffblue added a commit to hannes-steffenhagen-diffblue/cbmc that referenced this issue Feb 13, 2019
tautschnig added a commit that referenced this issue Feb 13, 2019
…-add_nullpointer_regression_test

Add KNOWNBUG regression test for GH issue #4168
kroening pushed a commit that referenced this issue Feb 16, 2019
This fixes #4168. The pointer case was not handled.
kroening pushed a commit that referenced this issue Feb 16, 2019
This fixes #4168. The pointer case was not handled.
kroening pushed a commit that referenced this issue Feb 17, 2019
This fixes #4168. The pointer case was not handled.
kroening pushed a commit that referenced this issue Feb 17, 2019
This fixes #4168. The pointer case was not handled.
kroening pushed a commit that referenced this issue Feb 17, 2019
This fixes #4168. The pointer case was not handled.
JohnDumbell pushed a commit to JohnDumbell/cbmc that referenced this issue Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants