|
From: João M. S. S. <joa...@gm...> - 2015-01-01 23:16:59
|
The problem is in: char command[128]; sprintf(command, "first part of command %s second part of command", filename.c_str()); The string is larger than 128 bytes. But valgrind does not detect this? Am I missing something? I forgot to mention, I'm using valgrind from SVN in an ARM machine. I usually use the version from SVN since it has a lot of false positives corrected. The log file shows 0 errors but a lot of: ==2346== Warning: invalid file descriptor 29541 in syscall read() which make it difficult to interpret the results. Should I report a bug and a suggestion upon this SVN version? On 01/01/2015 10:19 PM, "João M. S. Silva" wrote: > Let me correct myself: gdb catches the change on fd, but I thought it > didn't because it didn't break the execution. It just got running 100% > CPU and when I pressed ctrl-c it stopped in the culprit line. It always > stopped on the same line which was strange but I didn't realize it was > the line where the fd got erroneously modified. > > Now I ran it step by step with display of the variable and got it. -- João M. S. Silva |