Skip to content

Commit

Permalink
Add problematic example
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Sep 24, 2023
1 parent d0a90d8 commit 2f7c07f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/regression/73-strings/09-malloc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// PARAM: --disable ana.base.limit-string-addresses --enable ana.int.interval --enable ana.base.arrays.nullbytes

#include <goblint.h>
#include <string.h>
#include <stdlib.h>

int main () {
char* s1 = malloc(50);
s1[0] = 'a';

char s2[50];
s2[0] = 'a';

int len1 = strlen(s1); //WARN
int len2 = strlen(s2); //WARN
}

0 comments on commit 2f7c07f

Please sign in to comment.