aboutsummaryrefslogtreecommitdiff
path: root/lib/alloca86-bt.S
diff options
context:
space:
mode:
authorCarlos Montiers <carlos@thefunsouth.com>2014-07-10 00:37:20 -0400
committerCarlos Montiers <carlos@thefunsouth.com>2014-07-10 00:37:20 -0400
commit8257829623d484229c9785deedd05375c5732493 (patch)
treefbcfb5fa0e2ad1cb9e030dde4eda93eb8583ddbd /lib/alloca86-bt.S
parent89000c18dc7d5ccb2687948f94fe49d392990dab (diff)
downloadtinycc-8257829623d484229c9785deedd05375c5732493.tar.gz
tinycc-8257829623d484229c9785deedd05375c5732493.tar.bz2
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.
Diffstat (limited to 'lib/alloca86-bt.S')
-rw-r--r--lib/alloca86-bt.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/alloca86-bt.S b/lib/alloca86-bt.S
index ffad515..ff07bbb 100644
--- a/lib/alloca86-bt.S
+++ b/lib/alloca86-bt.S
@@ -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: