tinygo/builder
Ayke van Laethem 0565b7c0e0 cortexm: fix stack overflow because of unaligned stacks
On ARM, the stack has to be aligned to 8 bytes on function calls, but
not necessarily within a function. Leaf functions can take advantage of
this by not keeping the stack aligned so they can avoid pushing one
register. However, because regular functions might expect an aligned
stack, the interrupt controller will forcibly re-align the stack when an
interrupt happens in such a leaf function (controlled by the STKALIGN
flag, defaults to on). This means that stack size calculation (as used
in TinyGo) needs to make sure this extra space for stack re-alignment is
available.

This commit fixes this by aligning the stack size that will be used for
new goroutines.

Additionally, it increases the stack canary size from 4 to 8 bytes, to
keep the stack aligned. This is not strictly necessary but is required
by the AAPCS so let's do it anyway just to be sure.
2021-07-07 09:25:47 +02:00
..
ar.go builder: write a symbol table when writing out the compiler-rt lib 2019-11-13 13:52:20 +01:00
build.go cortexm: fix stack overflow because of unaligned stacks 2021-07-07 09:25:47 +02:00
buildcache.go builder: remove unused cacheKey parameter 2021-02-11 10:50:29 +01:00
builtins.go builder: make sure -fshort-enums is used consistently 2020-04-07 16:17:10 +02:00
cc.go main: escape commands while printing them with the -x flag 2021-06-02 16:29:30 +02:00
cc1as.cpp all: switch to LLVM 11 for static builds 2020-12-10 07:01:32 +01:00
cc1as.h main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
cc_test.go builder: cache C and assembly file outputs 2021-04-05 20:52:04 +02:00
clang.cpp all: switch to LLVM 11 for static builds 2020-12-10 07:01:32 +01:00
commands.go main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
config.go compiler: openocd commands in tinygo command line 2021-05-06 15:09:41 +02:00
elfpatch.go rp2040: patch elf to checksum 2nd stage boot 2021-06-17 12:10:04 +02:00
env.go Make lib64 clang include path check more robust. 2020-11-04 00:04:33 +01:00
error.go compiler: add location information to the IR checker 2019-12-21 20:49:51 +01:00
esp.go esp8266: add support for this chip 2020-09-09 19:17:11 +02:00
jobs.go builder: refactor link file inputs 2021-04-05 20:52:04 +02:00
library.go builder: hard code Clang compiler 2021-04-19 13:14:33 +02:00
lld.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
nrfutil.go support flashing pca10059 from windows 2021-06-08 14:17:04 +02:00
objcopy.go main: add initial support for (in-development) LLVM 11 2020-10-13 20:23:50 +02:00
picolibc.go builder: fix picolibc include path 2020-04-29 15:41:08 +02:00
sizes.go builder: work around a bug in ld.lld in LLVM 10 2020-04-09 20:23:51 +02:00
tools-builtin.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools-external.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools.go builder: hard code Clang compiler 2021-04-19 13:14:33 +02:00
uf2.go targets: add target circuitplay-bluefruit 2020-01-06 09:23:39 +01:00