[Interest] Using leveldb in a Qt app redirects unrelated system malloc calls to tcmalloc?

René J. V. Bertin rjvbertin at gmail.com
Sat Apr 14 09:37:47 CEST 2018


Thiago Macieira wrote:


> It's fork(). It calls the malloc routines.

Yeah, I discovered afterwards that tcmalloc injects itself and "infects" any 
application that links to it, whether directly or indirectly. It suggests 
somewhere in its instructions that you shouldn't link it to plugins, which makes 
me wonder a bit if the leveldb used by QtWebEngine is linked to tcmalloc.

FWIW I had a deadlock in KDevelop on Linux too, yesterday. Sadly I didn't get to 
verify if it was for the same reason as reported here on Mac. It it was then the 
underlying cause is probably an oversight somewhere in my code (a class 
reimplementing the basic QFile functionality to store key/value pairs in a 
database rather than in individual files; it involves storing and retrieving byte 
arrays via QByteArrays and std::strings).

R.




More information about the Interest mailing list