Fix problem using alloca function, executable crashed even with a exception handler function, when try to allocate INT_MAX. Patch provided by Jason Hood in private e-mail, when I ask to him for help. He say: Feel free to pass it on to the mailing list.

This commit is contained in:
Carlos Montiers
2014-07-10 00:37:20 -04:00
parent 89000c18dc
commit 8257829623
3 changed files with 6 additions and 6 deletions

View File

@ -14,10 +14,10 @@ __bound_alloca:
#ifdef TCC_TARGET_PE
p4:
cmp $4096,%eax
jle p5
jb p5
test %eax,-4096(%esp)
sub $4096,%esp
sub $4096,%eax
test %eax,(%esp)
jmp p4
p5: