Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.8
Description
When Qt is configured with ASAN (that in turn enables LSAN), lupdate/lconvert/lrelease fail at runtime when LSAN reports back memory leaks. Here's a minimal test case:
foo.cpp
#include <QObject>
QObject::tr("test");
Example invocation
$ LSAN_OPTIONS=max_leaks=1 /opt/qt58-asan/bin/lupdate -silent foo.cpp lupdate warning: no TS files specified. Only diagnostics will be produced. ================================================================= ==557466==ERROR: LeakSanitizer: detected memory leaks The 1 top leak(s): Direct leak of 80 byte(s) in 1 object(s) allocated from: #0 0x514b78 in operator new(unsigned long) /var/tmp/portage/sys-devel/llvm-3.8.1/work/llvm-3.8.1.src/projects/compiler-rt/lib/asan/asan_new_delete.cc:62 #1 0x955046 in loadCPP(Translator&, QStringList const&, ConversionData&) /home/jkt/work/prog/qt5/qttools/src/linguist/lupdate/cpp.cpp:2292:27 #2 0x8925a1 in processSources(Translator&, QStringList const&, ConversionData&) /home/jkt/work/prog/qt5/qttools/src/linguist/lupdate/main.cpp:548:5 #3 0x889ce7 in main /home/jkt/work/prog/qt5/qttools/src/linguist/lupdate/main.cpp:1032:9 #4 0x7f3ee96d0733 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.22-r4/work/glibc-2.22/csu/libc-start.c:289 #5 0x43a4b8 in _start (/opt/qt58-asan/bin/lupdate+0x43a4b8) Omitting 10 more leak(s). SUMMARY: AddressSanitizer: 712 byte(s) leaked in 11 allocation(s) $ echo $? 1
Because lupdate returned with a non-zero exit status, it's interpreted as a failure and the build process (of an external, Qt-using project) stops.