[compiler-rt] r182372 - [nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.
Peter Collingbourne
peter at pcc.me.uk
Thu May 23 06:32:12 PDT 2013
On Thu, May 23, 2013 at 04:54:56PM +0400, Timur Iskhodzhanov wrote:
> 2013/5/21 Peter Collingbourne <peter at pcc.me.uk>:
> > Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=182372&r1=182371&r2=182372&view=diff
> > ==============================================================================
> > --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
> > +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Tue May 21 07:08:37 2013
> > @@ -85,7 +85,7 @@ void StackTrace::PrintStack(const uptr *
> > frame_num++;
> > }
> > }
> > - if (symbolize && addr_frames_num == 0) {
> > + if (symbolize && addr_frames_num == 0 && SymbolizeCode) {
> > // Use our own (online) symbolizer, if necessary.
> > addr_frames_num = SymbolizeCode(pc, addr_frames.data(),
> > addr_frames.size());
>
> Peter,
>
> Can you please clarify why you've changed this condition?
> This gives a compiler warning when building on Windows (Visual Studio)
> as SymbolizeCode is a function name (not function pointer), I believe.
The patch turns SymbolizeCode into a weak symbol using the
SANITIZER_WEAK_ATTRIBUTE macro, in order to make the symboliser
optional. This macro is defined to be empty on Windows, which
is probably the cause of the problem.
Thanks,
--
Peter
More information about the llvm-commits
mailing list