mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-06 20:52:29 +00:00
Fix MODE=optlinux and MODE=tiny builds
This commit is contained in:
parent
5660ec4741
commit
0602ff6bab
12 changed files with 75 additions and 36 deletions
|
@ -34,14 +34,17 @@ void CrashHandler(int sig) {
|
|||
pthread_exit(0);
|
||||
}
|
||||
|
||||
int StackOverflow(void);
|
||||
int (*pStackOverflow)(void) = StackOverflow;
|
||||
int StackOverflow(void) {
|
||||
return pStackOverflow();
|
||||
int StackOverflow(int d) {
|
||||
char A[8];
|
||||
for (int i = 0; i < sizeof(A); i++)
|
||||
A[i] = d + i;
|
||||
if (__veil("r", d))
|
||||
return StackOverflow(d + 1) + A[d % sizeof(A)];
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *MyPosixThread(void *arg) {
|
||||
exit(pStackOverflow());
|
||||
exit(StackOverflow(0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue