0

我正在使用 Dr.Memory 进行调试,但不知何故它没有显示泄漏位置的行号。反正有没有看到或解决这个问题?我正在使用 c 这就是 -showreachable 给我的。我也尝试过 -Werror -g 但也没有找到行号。我只用 malloc 制作了 3 个新矩阵,我把它们全部释放了,所以有 6 个泄漏真的很奇怪。

~~Dr.M~~ Error #1: REACHABLE LEAK 4096 direct bytes 0x00000001033e22c0-0x00000001033e32c0 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ Error #2: REACHABLE LEAK 4096 direct bytes 0x00000001033e32e0-0x00000001033e42e0 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ Error #3: REACHABLE LEAK 513 direct bytes 0x00000001033e5460-0x00000001033e5661 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ Error #4: REACHABLE LEAK 80 direct bytes 0x00000001033e5910-0x00000001033e5960 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ Error #5: REACHABLE LEAK 36 direct bytes 0x00000001033e5980-0x00000001033e59a4 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ Error #6: REACHABLE LEAK 32 direct bytes 0x00000001033e59d0-0x00000001033e59f0 + 0 indirect bytes
~~Dr.M~~ <memory was allocated before tool took control>
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       0 unique,     0 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~       6 unique,     6 total,   8853 byte(s) of still-reachable allocation(s)
~~Dr.M~~ NO ERRORS IGNORED
4

0 回答 0