You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I don't know if this is a potential issue or simply a misuse of the library. When I have a a shared object and a main executable, both compiling against (the static library) chai, and where the executable links dynamically to my shared object, I get a double free error at the end of execution. This is most likely due to the static block that registers the chai plugin being called twice, which leads to chai being added twice to the list of the plugins. When exiting, the cleanup is done twice on the same object.
Here's a minimal working example.
The shared object's header:
Hi,
I don't know if this is a potential issue or simply a misuse of the library. When I have a a shared object and a main executable, both compiling against (the static library)
chai
, and where the executable links dynamically to my shared object, I get adouble free
error at the end of execution. This is most likely due to the static block that registers thechai
plugin being called twice, which leads tochai
being added twice to the list of the plugins. When exiting, the cleanup is done twice on the same object.Here's a minimal working example.
The shared object's header:
and
cpp
file:and the main executable:
If now I compile the shared object:
and the executable:
when I run I get a
double free
error:Is this a proper issue or is it simply forbidden to have multiple objects compiled against the static
chai
library?The text was updated successfully, but these errors were encountered: