Stefan Hundhammer wrote:
On Monday 24 April 2006 09:13, Per Jessen wrote:
I've got a suspected stack corruption, and as it involves an external library, I'm trying to determine who's to blame - my code or the library code. Without exception, the resulting segfault always happens in the external library (libclamav). Equally without exception, if I omit the single call to the library (cl_scanfile()), I see no problems.
That might easily be a usage problem (who owns what resource, who has to free allocated memory, ...).
Yeah, I think so too - but wouldn't that show on the heap, rather than in the stack? This has so far always hit the same function, called as part of cl_scanfile(). And always with a very clear stack corruption.
You might want to run your application with "valgrind" and double-check all problems it reports.
Yep, that's the next step - I've already valgrinded a couple of times and fixed a couple of problems, but another round won't hurt :-) Thanks. /Per Jessen, Zürich