|
From: Kacper K. <kac...@gm...> - 2017-09-07 13:31:28
|
Thank you very much, John Reiser, for such extensive help. If I understood correctly, memcheck uses hardcoded SP and it's r13? It should use the register passed with ldmdb instruction as SP (within this example it will be r11)? According to your suggestion I used "--ignore-range-below-sp=X-Y", but with other values, because valgrind documentation says that X must be > Y and they must be decimal. I used trial and error method to achieve smallest range defining ignored range and I finally found out that memcheck doesn't complain when I pass: "--ignore-range-below-sp=44-13" and valgrind works fine with "--leak-check=full" parameter used. I can't find out exactly why such numbers should be used. It is clear that 44 stand for 11 registers pushed on the stack, but why memcheck complains only when 8 registers are fetched ((44 - 13 + 1)/4 = 8)? Is it caused by updating of r13(==sp) after second fetch when ldmdb is used? |