I get a warning when running my program under valgrind:
==24214== Warning: silly arg (-1) to malloc()
How can I determine what call to malloc() is faulty? Is there a way I can do this without recompiling?
The program is compiled with
-g(debug) and without-s(strip).
I ended up inserting
printf‘s and finding if it came before or after the valgrindprintf. Less fancy than what you guys reccomended, but it worked faster than trying to implement the other solutions.