This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use libbacktrace as libsanitizer's symbolizer


On Tue, Nov 19, 2013 at 12:04 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Nov 18, 2013 at 09:09:03AM -0800, Ian Lance Taylor wrote:
>> > 2) for tsan querying of data symbols, apparently the classes want to see
>> >    not just the symbol name and start value, but also size.  libbacktrace
>> >    has all this info available, just doesn't pass it down to the callback.
>> >    I wonder if we'd need to create yet another libbacktrace entrypoint, or
>> >    if it would be acceptable to do source code incompatible, ABI (at least
>> >    on all sane targets) compatible version of just adding another
>> >    uintptr_t symsize argument to backtrace_syminfo_callback.
>>
>> I think it would be fine to change the callback.  I doubt that
>> libbacktrace is so widely used that we need to worry about backward
>> compatibility at this stage.  In particular I imagine that any users
>> of libbacktrace are simply copying the source code, since there is no
>> installable package.
>
> So how about this?  Due to the CLA etc. I have not done the obvious change
> to libgo/runtime/go-caller.c (syminfo_callback) that is needed together with
> that.
>
> 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
>
>         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
>         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
>         last argument.
>         * btest.c (struct symdata): Add size field.
>         (callback_three): Add symsize argument.  Copy it to the data->size
>         field.
>         (f23): Set symdata.size to 0.
>         (test5): Likewise.  If sizeof (int) > 1, lookup address of
>         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
>         values.

This is OK.

Thanks.

I will take care of libgo when this is committed.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]