History

Add bound check support for alloca on all targets

stddef.h, tccdefs.h, tccgen.c, tests/boundtest.c, tests/tcctest.c: - remove ifdef arround alloca lib/Makefile: - move alloca-bt.o to COMMON_O lib/alloca-bt.S: - add alloca bound check code for arm, arm64, riscv64 lib/alloca.S: - check for leading underscore tcc.h, libtcc.c: - include arm64-asm.c instead of arm-asm.c for arm64 tcctok.h, tccasm.c: - add simple reloc support (only for R_AARCH64_CALL26)

herman ten brugge committed 11 months ago

Commit 6da45941 parent fc424c912 files · +142 −59Browse files

Showing the changes to include (2 of 12 files). Show all

Unified · Split

2 files
  1. include/stddef.h +0 −2
  2. include/tccdefs.h +0 −4
include/stddef.h+0−2
@@ -19,9 +19,7 @@ typedef union { long long __ll; long double __ld; } max_align_t; · 18 unmodified lines
19#undef offsetof19#undef offsetof
20#define offsetof(type, field) __builtin_offsetof(type, field)20#define offsetof(type, field) __builtin_offsetof(type, field)
21 21
22#if defined __i386__ || defined __x86_64__
23void *alloca(size_t size);22void *alloca(size_t size);
24#endif
25 23
26#endif24#endif
27 25
include/tccdefs.h+0−4
@@ -347,12 +347,8 @@ · 346 unmodified lines
347 __MAYBE_REDIR(void*, calloc, (__SIZE_TYPE__, __SIZE_TYPE__))347 __MAYBE_REDIR(void*, calloc, (__SIZE_TYPE__, __SIZE_TYPE__))
348 __MAYBE_REDIR(void*, memalign, (__SIZE_TYPE__, __SIZE_TYPE__))348 __MAYBE_REDIR(void*, memalign, (__SIZE_TYPE__, __SIZE_TYPE__))
349 __MAYBE_REDIR(void, free, (void*))349 __MAYBE_REDIR(void, free, (void*))
350#if defined __i386__ || defined __x86_64__
351 __BOTH(void*, alloca, (__SIZE_TYPE__))350 __BOTH(void*, alloca, (__SIZE_TYPE__))
352 void *alloca(__SIZE_TYPE__);351 void *alloca(__SIZE_TYPE__);
353#else
354 __BUILTIN(void*, alloca, (__SIZE_TYPE__))
355#endif
356 __BUILTIN(void, abort, (void))352 __BUILTIN(void, abort, (void))
357 __BOUND(void, longjmp, ())353 __BOUND(void, longjmp, ())
358#if !defined _WIN32354#if !defined _WIN32

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t