[lld] r257661 - Attempt to make FreeBSD buildbot green.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 12:14:28 PST 2016


On Wed, Jan 13, 2016 at 11:40 AM, Rui Ueyama via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Wed Jan 13 13:40:13 2016
> New Revision: 257661
>
> URL: http://llvm.org/viewvc/llvm-project?rev=257661&view=rev
> Log:
> Attempt to make FreeBSD buildbot green.
>
> It seems that __cxa_demangle function on the buildbot tried to demangle
> a variable "tlsvar" as a C++ symbol. Do not call that function unless
> it does not start with "_Z" which is the prefix of mangled names.
>
> Modified:
>     lld/trunk/ELF/Symbols.cpp
>
> Modified: lld/trunk/ELF/Symbols.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=257661&r1=257660&r2=257661&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Symbols.cpp (original)
> +++ lld/trunk/ELF/Symbols.cpp Wed Jan 13 13:40:13 2016
> @@ -145,6 +145,11 @@ std::string elf2::demangle(StringRef Nam
>  #else
>    if (!Config->Demangle)
>      return Name;
> +
> +  // Return if it does not look like a C++ symbol.
> +  if (!Name.startswith("_Z"))
> +    return Name;
> +
>    char *Buf =
>        abi::__cxa_demangle(Name.str().c_str(), nullptr, nullptr, nullptr);
>    if (!Buf)
>

This seems to be a bug in libcxxabi.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list