Remap the cxa_at_exit earlier.

The problem was that the remapping happened on the first executeFunction, which
was fine. Now that we have the Transaction's empty wrapper functions removed it's
not enough.

NOTE: that any decls coming within the RuntimeUniverse.h which need 'managed'
storage will still trigger the same problem.
This commit is contained in:
Vassil Vassilev
2013-10-30 17:40:00 -05:00
committed by sftnight
parent ceb7eaf1fc
commit 4294b35b0c
3 changed files with 21 additions and 18 deletions

View File

@@ -229,8 +229,6 @@ namespace cling {
declare("#ifdef __CLING__ \n#endif");
#endif
declare("#include \"cling/Interpreter/RuntimeUniverse.h\"");
declare("#include \"cling/Interpreter/ValuePrinter.h\"");
if (getCodeGenerator()) {
// Set up the gCling variable if it can be used
std::stringstream initializer;
@@ -239,7 +237,9 @@ namespace cling {
<< (uintptr_t)this << ";} }";
declare(initializer.str());
}
m_ExecutionContext->remapCXAAtExit();
declare("#include \"cling/Interpreter/ValuePrinter.h\"");
}
else {
declare("#include \"cling/Interpreter/CValuePrinter.h\"");