File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ extern int w1, w2;
1010#define restrict __restrict__
1111#endif
1212
13- void *__builtin_alloca (unsigned long long sz);
13+ void *__builtin_alloca (unsigned long sz);
1414#define alloca __builtin_alloca
15- typedef unsigned long size_t ;
15+ typedef unsigned long long size_t ;
1616
1717int printf (const char *restrict format, ...);
1818void *memcpy (void *restrict s1, const void *restrict s2, size_t n);
Original file line number Diff line number Diff line change 11// semmle-extractor-options: --clang
22int printf (const char * restrict format , ...);
3- int sprintf (char * restrict buf , const char * restrict format , ...);
4- typedef unsigned long size_t ;
3+ int sprintf (char * restrict s , const char * restrict format , ...);
4+ typedef unsigned long long size_t ;
55void * memcpy (void * restrict s1 , const void * restrict s2 , size_t n );
6- void * malloc (size_t sz );
6+ void * malloc (size_t size );
77void free (void * ptr );
88
99struct vtype { int i1 , i2 ; };
1010extern int w1 , w2 ;
1111
12- void * _builtin_alloca (unsigned long long sz );
12+ void * _builtin_alloca (unsigned long sz );
1313#define alloca __builtin_alloca
1414
1515// We forward-declare the Microsoft routines
Original file line number Diff line number Diff line change 66#define restrict __restrict__
77#endif
88
9- int sprintf (char *restrict buf , const char *restrict format, ...);
10- char * strdup (const char *restrict str1 );
9+ int sprintf (char *restrict s , const char *restrict format, ...);
10+ char * strdup (const char *restrict s );
1111
12- void *__builtin_alloca (unsigned long long sz);
12+ void *__builtin_alloca (unsigned long sz);
1313#define alloca __builtin_alloca
1414
1515// case 1: a GNU c/c++ lambda with an alloca in it
You can’t perform that action at this time.
0 commit comments