[llvm-dev] VC C++ demangler

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 19 12:55:21 PDT 2017

On Mon, Jun 19, 2017 at 12:48 PM, Rui Ueyama <ruiu at google.com> wrote:
> We have clang/lib/AST/MicrosoftMangle.cpp, so looks like what I should do is
> to write code that do the reverse of it. One thing I should be careful is to
> produce the exact same outputs as Microsoft's UnDecorateSymbolName function
> would output so that the behavior doesn't change between Windows and
> non-Windows platforms, but it probably shouldn't be hard.

Something you may want to keep in mind while prototyping is that
writing a demangler in C++ (or any other unsafe language) is
particularly annoying, so you may want to keep fuzzers and sanitizers
always in your toolbox. The itanium demangler currently in tree
suffers from all kinds of bugs/vulnerabilities, FWIW.


More information about the llvm-dev mailing list