Skip to content

Commit 11ed4f3

Browse files
committed
Change __builtin_alloca declaration to use an unsigned long long parameter.
1 parent ff3430d commit 11ed4f3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern int w1, w2;
1010
#define restrict __restrict__
1111
#endif
1212

13-
void *__builtin_alloca(int sz);
13+
void *__builtin_alloca(unsigned long long sz);
1414
#define alloca __builtin_alloca
1515
typedef unsigned long size_t;
1616

cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void free(void *ptr);
99
struct vtype { int i1, i2; };
1010
extern int w1, w2;
1111

12-
void *_builtin_alloca(int sz);
12+
void *_builtin_alloca(unsigned long long sz);
1313
#define alloca __builtin_alloca
1414

1515
// We forward-declare the Microsoft routines

cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
int sprintf(char *restrict buf, const char *restrict format, ...);
1010
char * strdup(const char *restrict str1);
1111

12-
void *__builtin_alloca(int sz);
12+
void *__builtin_alloca(unsigned long long sz);
1313
#define alloca __builtin_alloca
1414

1515
// case 1: a GNU c/c++ lambda with an alloca in it

0 commit comments

Comments
 (0)