This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use libbacktrace as libsanitizer's symbolizer
- From: Ian Lance Taylor <iant at google dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Konstantin Serebryany <kcc at gcc dot gnu dot org>, Alexey Samsonov <samsonovatgoogledotcom at zalov dot cz>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2013 06:43:07 -0800
- Subject: Re: [PATCH] Use libbacktrace as libsanitizer's symbolizer
- Authentication-results: sourceware.org; auth=none
- References: <20131118133930 dot GA892 at tucnak dot redhat dot com> <CAKOQZ8zS+eexJA0b3Wtg3RXDCjE8An_knyrFcymcJoCBwD4=ZQ at mail dot gmail dot com> <20131119080410 dot GN892 at tucnak dot redhat dot com>
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