I have just receive an output from valgrind that I do not quite understand:
==20290== Invalid read of size 1 ==20290== at 0x8C1D678: ??? ==20290== by 0x5D74C47: ??? ==20290== Address 0xee818c7d is not stack'd, malloc'd or (recently) free'd ==20290== ==20290== ==20290== Process terminating with default action of signal 11 (SIGSEGV) ==20290== Access not within mapped region at address 0xEE818C7D ==20290== at 0x8C1D678: ??? ==20290== by 0x5D74C47: ??? ==20290== If you believe this happened as a result of a stack ==20290== overflow in your program's main thread (unlikely but ==20290== possible), you can try to increase the size of the ==20290== main thread stack using the --main-stacksize= flag. ==20290== The main thread stack size used in this run was 8388608. ==20290==
Particularly, I am confused by these question marks. Typically what you get on this place is the location of errors valgrind has detected. I have used valgrind before and all the output was as describe in the manual. I have used this valgrind command:
valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --track-origins=yes
The program itself yells a segmentation fault. Although valgrind does not tell me any location of the memory leak this time, from debugging I have determined the place where segmentation fault occurs. Unfortunately, it is within an ODE solver function from Intel ODE solver library (dodesol), and I have no access to it. I have carefully checked all the parameters I pass to this function many times and they seem to be ok (at least correspond to those in manual and examples I had before).