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
1919 #undef offsetof
2020 #define offsetof(type, field) __builtin_offsetof(type, field)
2121
22−#if defined __i386__ || defined __x86_64__
2322 void *alloca(size_t size);
24−#endif
2523
2624 #endif
2725
include/tccdefs.h+0−4
@@ -347,12 +347,8 @@ · 346 unmodified lines
347347 __MAYBE_REDIR(void*, calloc, (__SIZE_TYPE__, __SIZE_TYPE__))
348348 __MAYBE_REDIR(void*, memalign, (__SIZE_TYPE__, __SIZE_TYPE__))
349349 __MAYBE_REDIR(void, free, (void*))
350−#if defined __i386__ || defined __x86_64__
351350 __BOTH(void*, alloca, (__SIZE_TYPE__))
352351 void *alloca(__SIZE_TYPE__);
353−#else
354− __BUILTIN(void*, alloca, (__SIZE_TYPE__))
355−#endif
356352 __BUILTIN(void, abort, (void))
357353 __BOUND(void, longjmp, ())
358354 #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