[llvm-commits] [llvm] r112474 - /llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp

Chris Lattner clattner at apple.com
Mon Aug 30 10:25:28 PDT 2010


On Aug 30, 2010, at 7:00 AM, NAKAMURA Takumi wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=112474&view=rev
> Log:
> EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
> 
> On Mingw and Cygwin, the symbol __main is resolved to
> callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
> (and register wrong callee's dtors with atexit(3)).
> We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
> is called before ExecutionEngine::runFunctionAsMain() is called.

Ok:

> @@ -104,6 +108,14 @@
>     if (Name == "exit") return (void*)(intptr_t)&jit_exit;
>     if (Name == "atexit") return (void*)(intptr_t)&jit_atexit;
> 
> +    // We shuold not invoke parent's ctors/dtors from main()! (PR3897)

typo "should", also, please don't put PR#'s into the code.  Thanks for fixing this!

-Chris



More information about the llvm-commits mailing list