[LLVMbugs] [Bug 14107] clang crashes on -add-plugin

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 24 08:36:35 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14107

Laszlo Nagy <rizsotto.mailinglist at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Laszlo Nagy <rizsotto.mailinglist at gmail.com> 2012-10-24 10:36:35 CDT ---
It seems that the "CommandLine 2.0 Library" is using so much of static
everywhere cause the crash.

Did some experiments, and plugins without using the command line library works
just fine. Then had a little gdb session, where found that calling
'llvm::cl::ParseCommandLineOptions' method happens only once with -plugin
option, but with -add-plugin it happens twice. And it also have seen, that
plugins which are using the command line library are mutating the arguments for
the second call somehow, and this mutated call do the core dump.

Could not trace the root of the problem, but could work around and make the
command line library happy. If the parser is not member variable in the plugin
class, it works just fine.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list