Open GoogleCodeExporter opened 9 years ago
One idea zubr brought up was to have the function prologue raise an exception
for an imminent stack overrun (i.e., if it got below 0xb0000000). However, it's
not at all clear that such a mechanism exists because we're pretty much the
only arch that has to worry about it. This could be done in TrampolineOSXPPC,
or possibly in the prologue generator in NativePPC.cpp if we don't make it to
methodjit.
Original comment by classi...@floodgap.com
on 1 Dec 2011 at 7:19
If we could get a decent backtrace (maybe with a watchpoint 100 MB down the
stack before loading the testcase, to catch when it's hitting crazy
consumption?), I wonder whether the JSContext->stackLimit is even set. If it's
not, maybe all that needs to happen is to patch in a call to
JS_SetNativeStackQuota() so that the stack consumption limiting code already in
js/ actually takes effect?
Original comment by magef...@gmail.com
on 2 Dec 2011 at 8:52
Curiouser and curiouser... I've been doing the following test:
1. Start 10.4Fx
2. attach to it in gdb
3. set a watch point with "watch *(int *)(stack-base - 1024*1024)" and
stack-base is 0xf0000000 for 9beta or 0xb0000000 for <= 8.0
4. continue in gdb
5. load all the supposedly high stack-usage pages I can and wait for the
watchpoint to hit
5a. use ^C in gdb to pause 10.4Fx occasionally and use "info reg" to check the current value of sp (=r1) and see if it's excessive
And with all the test cases from the various closed bugs, I've never seen more
than ~100 kB of usage... Although that may also be due to the test cases fixing
their bad code, since I can't reproduce issue 113 in 10.4Fx 8 now, either.
Original comment by magef...@gmail.com
on 4 Dec 2011 at 4:41
https://bugzilla.mozilla.org/show_bug.cgi?id=685097
This is only for IonMonkey, though it is still based on our old jsapi friends.
Still, we should be able to wedge that.
Original comment by classi...@floodgap.com
on 17 Dec 2011 at 3:39
Original issue reported on code.google.com by
classi...@floodgap.com
on 1 Dec 2011 at 2:35