[PATCH] libsanitizer demangling using cp-demangle.c
Thu Jan 16 13:58:00 GMT 2014
I've landed patches for libbacktrace and cp-demangle support in LLVM.
However, they required some changes (e.g. some files LLVM trunk were
modified after the last merge). This means that the next merge to GCC
(IIUC it won't happen anytime soon before GCC 4.9 release) will not be
clean. Sorry for delay.
On Fri, Jan 10, 2014 at 7:56 AM, Konstantin Serebryany
> On Thu, Jan 9, 2014 at 5:57 PM, Jakub Jelinek <email@example.com> wrote:
>> On Thu, Jan 09, 2014 at 05:51:05PM +0400, Konstantin Serebryany wrote:
>>> On Tue, Dec 10, 2013 at 3:38 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
>>> > On Fri, Dec 06, 2013 at 06:40:52AM -0800, Ian Lance Taylor wrote:
>>> >> There was a recent buggy patch to the demangler that added calls to
>>> >> malloc and realloc (2013-10-25 Gary Benson <email@example.com>).
>>> >> That patch must be fixed or reverted before the 4.9 release. The main
>>> >> code in the demangler must not call malloc/realloc.
>>> >> When that patch is fixed, you can use the cplus_demangle_v3_callback
>>> >> function to get a demangler that never calls malloc.
>>> > AFAIK Gary is working on a fix, when that is fixed, with the following
>>> > patch libsanitizer (when using libbacktrace for symbolization) will not
>>> > use system malloc/realloc/free for the demangling at all.
>>> > Tested on x86_64-linux (-m64/-m32). Note that the changes for the 3 files
>>> > unfortunately will need to be applied upstream to compiler-rt, is that
>>> > possible?
>>> > 2013-12-10 Jakub Jelinek <firstname.lastname@example.org>
>>> > * sanitizer_common/sanitizer_symbolizer_libbacktrace.h
>>> > (LibbacktraceSymbolizer::Demangle): New declaration.
>>> > * sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
>>> sanitizer_symbolizer_posix_libcdep.cc is the file from upstream.
>>> If it gets any change in the GCC variant, I will not be able to do
>>> merges from upstream until the same code is applied upstream.
>> Sure, but we are nearing GCC 4.9 stage3 finish and really need to demangle
>> the libbacktrace provided output. Has the compiler-rt situation been
>> cleared up?
> I hope it just did (see the fresh Chandler's reply).
>> Haven't seen any follow-ups after Chandler's reversion.
>> So, this change is meant to be temporary, with hope that in upstream this
>> will be resolved, either with the same patch or something similar.
Alexey Samsonov, MSK
More information about the Gcc-patches