Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6
-
None
Description
I have a MSVC build of Qt with address sanitizer enabled. Upon building an application using this build of Qt with QMake I am faced with these linker errors:
Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_report_load4 referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_report_load8 referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_report_store4 referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_report_store8 referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_set_shadow_00 referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol __asan_shadow_memory_dynamic_address referenced in function "int __cdecl qtEntryPoint(void)" (?qtEntryPoint@@YAHXZ) VCASAND.lib(vcasan.obj) : error LNK2019: unresolved external symbol __asan_get_report_description referenced in function "void __cdecl __vcasan::ReportCallback(char const *)" (?ReportCallback@__vcasan@@YAXPEBD@Z) VCASAND.lib(vcasan.obj) : error LNK2019: unresolved external symbol __asan_set_error_report_callback referenced in function "public: __cdecl __vcasan::VSErrorReportingInit::VSErrorReportingInit(void)" (??0VSErrorReportingInit@__vcasan@@QEAA@XZ)
The solution is to add -fsanitize to the command line.
QMAKE_CFLAGS += -fsanitize=address QMAKE_CXXFLAGS += -fsanitize=address
But optimally the application would either inherit this, or the entry point lib would not be compiled with these symbols.
Attachments
Issue Links
- relates to
-
QTBUG-98279 -lasan recorded in Qt6Core.prl when building Qt with address sanitizer
-
- Reported
-
-
QTBUG-92083 Building console project fails with linker errors
-
- Closed
-