OOB when tearing down connection
Happens on an old version, but there should be any relevant change since then. This is likely to be more of a race condition than an actual memory issue.
It doesn't happen systematically, and I wouldn't be surprised if it happened because the lua interface was querying the medialib early on while the Qt interface was loading, and something got messed up in the connection hashtable
==6495==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f4e4dd20bf0 at pc 0x7f4e6e6d5204 bp 0x7f4e4dd20bb0 sp 0x7f4e4dd20360
WRITE of size 144 at 0x7f4e4dd20bf0 thread T5
#0 0x7f4e6e6d5203 (/lib/x86_64-linux-gnu/libasan.so.5+0x4d203)
#1 0x7f4e687cf96f (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x6b96f)
#2 0x7f4e687758b1 (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x118b1)
#3 0x7f4e687ddfa7 (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x79fa7)
#4 0x7f4e687df519 (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x7b519)
#5 0x7f4e687df6c7 (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x7b6c7)
#6 0x7f4e687dfce6 (/lib/x86_64-linux-gnu/libsqlite3.so.0+0x7bce6)
#7 0x7f4e68c44c99 in std::_Hashtable<std::thread::id, std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, std::allocator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> > >, std::__detail::_Select1st, std::equal_to<std::thread::id>, std::hash<std::thread::id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_erase(unsigned long, std::__detail::_Hash_node_base*, std::__detail::_Hash_node<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, false>*) /usr/include/c++/8/bits/unique_ptr.h:274
#8 0x7f4e68c44c99 in std::_Hashtable<std::thread::id, std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, std::allocator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> > >, std::__detail::_Select1st, std::equal_to<std::thread::id>, std::hash<std::thread::id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::erase(std::__detail::_Node_const_iterator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, false, false>) /usr/include/c++/8/bits/hashtable.h:1883
#9 0x7f4e68c40f57 in std::_Hashtable<std::thread::id, std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, std::allocator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> > >, std::__detail::_Select1st, std::equal_to<std::thread::id>, std::hash<std::thread::id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::erase(std::__detail::_Node_iterator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, false, false>) /usr/include/c++/8/bits/hashtable.h:767
#10 0x7f4e68c40f57 in std::unordered_map<std::thread::id, std::unique_ptr<sqlite3, int (*)(sqlite3*)>, std::hash<std::thread::id>, std::equal_to<std::thread::id>, std::allocator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> > > >::erase(std::__detail::_Node_iterator<std::pair<std::thread::id const, std::unique_ptr<sqlite3, int (*)(sqlite3*)> >, false, false>) /usr/include/c++/8/bits/unordered_map.h:798
#11 0x7f4e68c40f57 in medialibrary::sqlite::Connection::ThreadSpecificConnection::~ThreadSpecificConnection() src/database/SqliteConnection.cpp:280
#12 0x7f4e6c3e851e in __GI___call_tls_dtors /build/glibc-vjB4T1/glibc-2.28/stdlib/cxa_thread_atexit_impl.c:155
#13 0x7f4e6c576fb0 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:494
#14 0x7f4e6c4a74ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)