We are developing Linux service application based on Ubuntu 22.04 and C++20 and the application connects to AWS Redshift service using unixODBC.
In debug build we are running ASAN with enabled LeakSanitizer, that records memory leak originating from SQLDriverConnect.
I have the following (latest & greatest that time when the problem discovered) driver installed:
https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.59.1000/AmazonRedshiftODBC-64-bit-1.4.59.1000-1.x86_64.deb
I also tried with an earlier version of Redshift ODBC driver too.
Running the following command line, I can constantly reproduce the following memory leak report:
ASAN_OPTIONS=verbosity=1:fast_unwind_on_malloc=0:check_initialization_order=1 ./memleak
The minimal example to reproduce the program:
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include <string>
int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv_char[], __attribute__((unused)) char* env_char[]) {
SQLHENV env = nullptr;
std::cerr << SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env) << std::endl;
std::cerr << SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, reinterpret_cast<SQLPOINTER>(SQL_OV_ODBC3), 0) << std::endl;
SQLHDBC dbc = nullptr;
std::cerr << SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc) << std::endl;
std::cerr << SQLSetConnectAttr(dbc, SQL_ATTR_AUTOCOMMIT, reinterpret_cast<SQLPOINTER>(true), 0) << std::endl;
std::string connectionString = "Driver={Amazon Redshift (x64)};Server=<...>;Port=5439;Database=<...>;UID=<...>;PWD=<...>";
std::cerr << SQLDriverConnect(dbc, nullptr, (SQLCHAR*)connectionString.c_str(), connectionString.size(), nullptr, 0, nullptr, SQL_DRIVER_COMPLETE) << std::endl;
std::cerr << SQLDisconnect(dbc) << std::endl;
std::cerr << SQLFreeHandle(SQL_HANDLE_DBC, dbc) << std::endl;
std::cerr << SQLFreeHandle(SQL_HANDLE_ENV, env) << std::endl;
return 0;
}
The ASAN log output:
==30839==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 72 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3ea9db8 in __interceptor_calloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3db8) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fa8b4f8e (<unknown module>)
#2 0x7f21fa8b534c (<unknown module>)
#3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
#4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
#5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
#6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
#7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
#8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
#2 0x7f21fb1c2538 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring*) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f7538)
#3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
#4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
#5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
#6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
#7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 176 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fb131fa6 in sbicu_58__sb64::UnicodeString::allocate(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x666fa6)
#2 0x7f21fb132307 in sbicu_58__sb64::UnicodeString::UnicodeString(int, int, int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x667307)
#3 0x7f21fb2165d4 in Simba::Support::simba_wstring::GetWritableBuffer(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x74b5d4)
#4 0x7f21fb23a712 in Simba::Support::WideStringConverter::ConvertToWString(unsigned char const*, int, Simba::Support::EncodingType, Simba::Support::simba_wstring&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x76f712)
#5 0x7f21fad8b190 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0190)
#6 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
#7 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
#8 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fb0cf2c8 in sbicu_58__sb64::UMemory::operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6042c8)
#2 0x7f21fb213d90 in Simba::Support::simba_wstring::simba_wstring(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x748d90)
#3 0x7f21fb1c25d0 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75d0)
#4 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
#5 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
#6 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
#7 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
#8 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#9 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#10 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#11 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#12 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#13 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#14 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#15 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 10 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fa8b4fa8 (<unknown module>)
#2 0x7f21fa8b534c (<unknown module>)
#3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
#4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
#5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
#6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
#7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
#8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
#2 0x7f21fb1c25c2 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75c2)
#3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
#4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
#5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
#6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
#7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 5 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fa8b4fb8 (<unknown module>)
#2 0x7f21fa8b534c (<unknown module>)
#3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
#4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
#5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
#6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
#7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
#8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fa8b4fdf (<unknown module>)
#2 0x7f21fa8b534c (<unknown module>)
#3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
#4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
#5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
#6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
#7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
#8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
Indirect leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
#1 0x7f21fa8b502f (<unknown module>)
#2 0x7f21fa8b534c (<unknown module>)
#3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
#4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
#5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
#6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
#7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
#8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
#9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
#10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
#11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
#12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
#13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
#14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
#15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
SUMMARY: AddressSanitizer: 353 byte(s) leaked in 9 allocation(s).
I have had to switch from C++11 to C++14 in my project to use the Catch testing framework, written for C++14 (it doesn't compile with anything less). Everything compiles fine. However, while running the program, the following function causes a series of errors which seem linked to a mismatch between C++11 and C++14 shared standard library files:
//it is called as such:
string p = "...";
handle_file(p);
//...
int handle_file (string p) {
if (is_valid(p)) {
return 0;
}
else return -1;
}
The error trace in gdb reads:
Program received signal SIGABRT, Aborted.
0x00007ffff7299ef5 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7299ef5 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7283862 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff72dbf38 in __libc_message () from /usr/lib/libc.so.6
#3 0x00007ffff72e3bea in malloc_printerr () from /usr/lib/libc.so.6
#4 0x00007ffff72e5113 in _int_free () from /usr/lib/libc.so.6
#5 0x00007ffff72e8ca8 in free () from /usr/lib/libc.so.6
#6 0x00007ffff76b76ea in operator delete (ptr=<optimized out>) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/del_op.cc:49
#7 0x00007ffff76b76fa in operator delete (ptr=<optimized out>) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/del_ops.cc:33
#8 0x000055555556c893 in __gnu_cxx::new_allocator<char>::deallocate (__t=<optimized out>, __p=<optimized out>, this=0x7fffffffd910)
at /usr/include/c++/10.2.0/ext/new_allocator.h:133
#9 std::allocator_traits<std::allocator<char> >::deallocate (__n=<optimized out>, __p=<optimized out>, __a=...)
at /usr/include/c++/10.2.0/bits/alloc_traits.h:492
#10 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (__size=<optimized out>, this=0x7fffffffd910)
at /usr/include/c++/10.2.0/bits/basic_string.h:237
#11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (this=0x7fffffffd910)
at /usr/include/c++/10.2.0/bits/basic_string.h:232
#12 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (this=0x7fffffffd910, __in_chrg=<optimized out>)
at /usr/include/c++/10.2.0/bits/basic_string.h:658
#13 Manager::handle_file (p ="./data/20pix", this=0x5555556c6d20)
at src/manager.hpp:149
Does anyone know how to solve this?
The error is inside malloc, after it has printed some error message (usually double-free or something similar) indicating heap corruption.
While it is possible that you have some kind of library mismatch, it is much more likely that you have a plain heap corruption bug in your own code (overflowing heap buffer, double delete, delete of non-allocated, etc. etc.), and that bug is simply getting exposed now, while it remained hidden before.
Your first step should be to run the program under Valgrind or with Address Sanitizer, and fix any errors these tools report.
I have some weird multithreading bugs, so I wanted to use the gcc thread sanitizer to find them. However, when I compile with -sanitize=thread the resulting binary segfaults immediatly with the following stacktrace:
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff5911cee in ?? () from /usr/lib/x86_64-linux-gnu/libtsan.so.0
#2 0x00007ffff593408d in ?? () from /usr/lib/x86_64-linux-gnu/libtsan.so.0
#3 0x00007ffff58eeb98 in ?? () from /usr/lib/x86_64-linux-gnu/libtsan.so.0
#4 0x00007ffff58ef0ce in __interceptor___cxa_atexit ()
from /usr/lib/x86_64-linux-gnu/libtsan.so.0
#5 0x00007ffff55d1e56 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff7de74ea in call_init (l=<optimised out>, argc=argc#entry=1,
argv=argv#entry=0x7fffffffdeb8, env=env#entry=0x7fffffffdec8)
at dl-init.c:72
#7 0x00007ffff7de75fb in call_init (env=0x7fffffffdec8, argv=0x7fffffffdeb8,
argc=1, l=<optimised out>) at dl-init.c:30
#8 _dl_init (main_map=0x7ffff7ffe168, argc=1, argv=0x7fffffffdeb8,
env=0x7fffffffdec8) at dl-init.c:120
#9 0x00007ffff7dd7cfa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#10 0x0000000000000001 in ?? ()
#11 0x00007fffffffe22b in ?? ()
#12 0x0000000000000000 in ?? ()
I tried adding the -static-libtsan attribute, but now I get the following error:
FATAL: ThreadSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_allocator.h:1203 "((IsAligned(p, page_size_))) != (0)" (0x0, 0x0)
#0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (sql+0x0000004aeb53)
#1 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (sql+0x0000004aeb5b)
#2 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (sql+0x0000004b3af3)
#3 __tsan::user_free(__tsan::ThreadState*, unsigned long, void*, bool) <null> (sql+0x00000049e6fc)
#4 operator delete(void*) <null> (sql+0x00000045f6ec)
#5 __static_initialization_and_destruction_0(int, int) [clone .constprop.123] <null> (sql+0x00000044a4ab)
#6 __libc_csu_init <null> (sql+0x00000254468c)
#7 __libc_start_main <null> (libc.so.6+0x0000000207be)
#8 _start <null> (sql+0x000000459e18)
How can I fix this? What am I doing wrong here?
I haven't used TSAN w/gcc so can't help there, but you might want to give it a shot with clang (https://clang.llvm.org/). Since TSAN is part of clang, bugs tend to get fixed there first.
If you need help building clang, I've also written an article that might be useful: http://btorpey.github.io/blog/2015/01/02/building-clang/
Answer found here:
https://groups.google.com/forum/#!topic/thread-sanitizer/5cxyhIrl_SE
You don't need to give -ltsan (at least when using clang). You need to
give -fsanitize=thread both when compiling and linking.
-fsanitize=thread when linking will ensure that all proper libraries
get linked in.
This worked for me for both clang and gcc
For some reason only in debug mode (with flags -g3) I have a segmentation fault with Boost Locale format function.
// at ../../source/EntryPoint/Application.cpp:110
logInfo("sdfsdf");
which internally without any transformations uses boost::locale::format
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3a893c3 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0x00007ffff3a893c3 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libstdc++.so.6
#1 0x0000000000d8392b in boost::locale::details::formattible<char>::write<std::string> (output=..., ptr=0x7fffffffd340)
at /usr/include/boost/locale/format.hpp:92
#2 0x0000000000d837b6 in boost::locale::details::operator<< (out=..., fmt=...)
at /usr/include/boost/locale/format.hpp:78
#3 0x0000000000d8319e in boost::locale::basic_format<char>::format_output (
this=0x7fffffffd410, out=..., sformat="[{1} | {2}]: ({3}, {4})")
at /usr/include/boost/locale/format.hpp:395
#4 0x0000000000d82b45 in boost::locale::basic_format<char>::write (
this=0x7fffffffd410, out=...) at /usr/include/boost/locale/format.hpp:269
#5 0x0000000000d8277f in boost::locale::basic_format<char>::str (
this=0x7fffffffd410, loc=...) at /usr/include/boost/locale/format.hpp:254
#6 0x0000000000d823eb in Uni::Logging::Private::Formatter::_format<std::string&, std::string&, char const*&, int const&> (
this=0x135afa0 <Uni::Logging::Private::Formatter::get()::_instance>,
message="[{1} | {2}]: ({3}, {4})") at /opt/Uni/source/Logging/format.hpp:30
#7 0x0000000000d8221b in Uni::Logging::Private::Formatter::format<std::string&, std::string&, char const*&, int const&> (message="[{1} | {2}]: ({3}, {4})")
at /opt/Uni/source/Logging/format.hpp:19
---Type <return> to continue, or q <return> to quit---
#8 0x0000000000d8210e in Uni::Logging::format<std::string&, std::string&, char const*&, int const&> (message="[{1} | {2}]: ({3}, {4})")
at /opt/Uni/source/Logging/format.hpp:77
#9 0x0000000000e465a3 in Uni::Logging::SimpleLogger::log<>(int const&, char const*, int const&, std::string const&) (
this=0x135b048 <_ZL30Uni_Logging_globalSimpleLogger>,
severity=#0x7fffffffd76c: 2,
notifiedFilePath=0x103bcd8 "../../source/EntryPoint/Application.cpp",
notifiedLineNumber=#0x7fffffffd768: 110, message="sdfsdf")
at /opt/Uni/source/Logging/SimpleLogger.hpp:49
#10 0x0000000000e8f753 in FsiSimulation::EntryPoint::ApplicationPrivateImplementation::ApplicationPrivateImplementation (this=0x13662d0, in=0x7fffffffd820,
argc_=#0x7fffffffd81c: 1, argv_=0x7fffffffd938)
at ../../source/EntryPoint/Application.cpp:110
#11 0x0000000000e8b72b in FsiSimulation::EntryPoint::Application::Application (
this=0x7fffffffd820, argc=#0x7fffffffd81c: 1, argv=0x7fffffffd938)
at ../../source/EntryPoint/Application.cpp:158
#12 0x0000000000e8b517 in main (argc=1, argv=0x7fffffffd938)
at ../../source/EntryPoint/main.cpp:7
Once again with the same code I don't have any segmentation faults in release mode. Any ideas how to track the problem?