mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Finally fixed the loaderbug!
Programs were crashing randomly at startup on the kthread branch. After some investigation, it turned out that the programs weren't correctly loaded by the program loader in rare cases. Although, all investigation showed that the program loader was correct and so was the interrupt routines (well, almost, but nothing that could really trigger this). Yada yada, a few months later I discovered that memcpy(3) was being corrupted by an interrupt handler (which was correct). Turns out memcpy used stack space it hadn't allocated. This is a Linux optimization that I had forgotten to disable with -mno-red-zone in libmaxsi and thus interrupts just overwrote the stack of optimized functions. Eek!
This commit is contained in:
parent
2046482e77
commit
0ab2bbbd1b
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ endif
|
|||
ifeq ($(CPU),x64)
|
||||
CPU=x64
|
||||
CPUDEFINES=-DPLATFORM_X64
|
||||
CPUFLAGS=-fPIC -m64
|
||||
CPUFLAGS=-fPIC -m64 -mno-red-zone
|
||||
CPULDFLAGS=-melf_x86_64
|
||||
CPUASFLAGS=-64
|
||||
endif
|
||||
|
|
Loading…
Add table
Reference in a new issue