我正在使用valgrind来检测内存泄漏.valgrind的输出由命令生成
valgrind -v --leak-check=full ../spython test.py 2>/tmp/log
Run Code Online (Sandbox Code Playgroud)
事实上,我的程序是一个高度简化的python解释器(家庭作业ToT),你可以从名称推断 spython test.py
困扰我的是底部的输出
==24269== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
--24269--
--24269-- used_suppression: 3 dl-hack3-cond-1
Run Code Online (Sandbox Code Playgroud)
这是什么意思?我抬头看,dl-hack3-cond-1valgrind的抑制文件中没有default.supp.我想消除这个恼人的抑制错误(这意味着通过valgrind测试,而不是'抑制抑制').
这是/ tmp/log的内容:
==24269== Memcheck, a memory error detector
==24269== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==24269== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==24269== Command: ../spython test.py
==24269==
--24269-- Valgrind options:
--24269-- -v
--24269-- --leak-check=full
--24269-- Contents of /proc/version: …Run Code Online (Sandbox Code Playgroud)