Add compiler flags and debug messages in search of memory access errors.

This commit is contained in:
sawinglogz 2019-05-05 15:50:38 -04:00
parent 9da60239c8
commit e4082fff22
2 changed files with 8 additions and 0 deletions

View File

@ -779,6 +779,9 @@ void PRS1Loader::ScanFiles(const QStringList & paths, int sessionid_base, Machin
}
SessionID chunk_sid = chunk->sessionid;
if (chunk_sid != sid && chunk_sid > 2000) { // log any really weird session IDs
qDebug() << fi.canonicalFilePath() << chunk_sid;
}
if (m->SessionExists(sid)) {
delete chunk;
continue;

View File

@ -442,6 +442,11 @@ test {
QT -= gui
CONFIG += console debug
CONFIG -= app_bundle
!win32 { # add memory checking on Linux and macOS test builds
QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_LFLAGS += -fsanitize=address
}
SOURCES += \
tests/prs1tests.cpp \