Jörn Engel wrote: >>The stack overflow checking in -mjb uses gcc's mcount mechanism to >>detect overflows. It should get called on every single function call. > > Nice trick. Do you have better documentation on that machanism than > man gcc? The paragraph to -p is quite short and I cannot make the > connection to the rest of the patch immediately. It is a nice trick, but I didn't write it :) I stole the code from Ben LaHaise, around 2.5.20. All that I've needed to know to maintain the patch is that a "jmp mcount" gets placed in the critical places. I've attached a fairly recent version of the stack check patch. If you need some more examples, check out kernprof's use of it. It's acg functionality used mcount as well. -- Dave Hansen haveblue@us.ibm.com