If you know the function, then you can try create gdb script that
 after breaking at some line of the function enables hardware write
 breakpoint on stack section that should not be written, continue, and
 when reaching return, removes hw breakpoint.
 Just first thing that comes to mind..

On 22 Jan 2004, at 0:05, Henrik Nordstrom <[EMAIL PROTECTED]> wrote:

> Hello fellow coders.
>
> I am in desperate need of some advice in how to debug a intermettent stack
> smashing problem.
>
> There is no problem detecting when this happens as Squid segfaults almost
> immediately (on return from the function which smashed the stack), just
> not where. As the stack is quite smashed a function return ends up at
> address 0 and there is no stack frames to follow..
>
> As the problem does not occur very frequently running with full debug
> enabled is not really feasible.
>
> I have tried using stackshield, but that tool is simply not yet mature or
> maintained and the current version has very many bugs, mostly due to very
> weak parser.. (needs to be rewritten). Attempted to build Squid with
> stackshield enabled (after fixing some obvious bugs in stackshield) but
> the resulting binary is not even a fully valid binary..
>
> Does any of you know about other tools which can be used to trap where the
> stack gets smashed?
>
> Regards
> Henrik
>



------------------------------------
 Andres Kroonmaa <[EMAIL PROTECTED]>
 CTO, Microlink Data AS
 Tel: 6501 731, Fax: 6501 725
 P�rnu mnt. 158, Tallinn
 11317 Estonia

Reply via email to