Compare commits

..

No commits in common. "14301c372dfa6cef314139c44546e5646d34fade" and "33d3adba3fce1cf880acd3e3c4b9968cc6e50cab" have entirely different histories.

3 changed files with 4 additions and 13 deletions

View file

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.7)
project(AnotherMemCheck)
set(AnotherMemCheck_VERSION 2.8)
set(AnotherMemCheck_VERSION 2.7)
set(AnotherMemCheck_SOVERSION 2)
set(AnotherMemCheck_SOURCES

View file

@ -1,11 +1,5 @@
# Changelog
## Version 2.8
Internal refactorings.
Minor change to avoid segfault when program exits with `exit(...)` function.
## Version 2.7
Fix incorrect initialization.

View file

@ -217,12 +217,9 @@ namespace SC_AM_Internal {
void exit_handler_stats() {
if (SC_AM_Internal::stats != nullptr) {
SC_AM_Internal::stats->print_status();
// Avoids segfault when program calls `exit(...)`. OS should reclaim memory
// when the process ends even if it isn't free'd here.
//using SCS_AM_INTERNAL_Stats = SC_AM_Internal::Stats;
//SC_AM_Internal::stats->~SCS_AM_INTERNAL_Stats();
//SC_AM_Internal::stats = nullptr;
using SCS_AM_INTERNAL_Stats = SC_AM_Internal::Stats;
SC_AM_Internal::stats->~SCS_AM_INTERNAL_Stats();
SC_AM_Internal::stats = nullptr;
}
}