We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 076eb8a commit 3c84edbCopy full SHA for 3c84edb
source/loader/layers/sanitizer/asan_interceptor.cpp
@@ -154,12 +154,14 @@ SanitizerInterceptor::~SanitizerInterceptor() {
154
DestroyShadowMemoryOnCPU();
155
DestroyShadowMemoryOnPVC();
156
157
- if (!m_AllocationMap.empty()) {
158
- for (const auto &[_, AI] : m_AllocationMap) {
159
- if (!AI->IsReleased) {
160
- ReportMemoryLeak(AI);
161
- }
+ bool HasLeak = false;
+ for (const auto &[_, AI] : m_AllocationMap) {
+ if (!AI->IsReleased) {
+ HasLeak = true;
+ ReportMemoryLeak(AI);
162
}
163
+ }
164
+ if (HasLeak) {
165
exit(1);
166
167
0 commit comments