I have a big application that uses the dynamically loaded libraries. At the end of program while terminating it either segfaults or spits a message "glibc detected corrupted double-linked list". Looking at the valgrind output I think this is what the case is: let say we have three files:
utilities.c - compiled with -fPIC and used ar and ranlib to create utilities.a.
dynamicallyloaded.c- compiled with -fPIC and -shared and linked with utlities.a to generate dynamicallyloaded.so
main.c - compiled with -fPIC and linked with utilities.a to create main. main dynamically loads and uses dynamicallyloaded.so .
utilities.h - delclared a class IfTrackerFile with AubFileName as a static string member like static string AubFileName;
utilities.cpp - defines the static variable: string IfTrackerFile::AubFileName;
valgrind out says that there was invalid free/delete/delete on the line : string IfTrackerFile::AubFileName;
i have no clue what's going on. truly appreciate any help/direction in this regard.