NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/51363: ubsan (undef behaviour sanitizer) faults
The following reply was made to PR lib/51363; it has been noted by GNATS.
From: bch <brad.harder%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/51363: ubsan (undef behaviour sanitizer) faults
Date: Mon, 1 Aug 2016 13:59:21 -0700
I have since also tried w/ in-tree clang, to same effect, so I don't
see a difference between pkgsrc and the ./src/external/bsd/llvm/*
distribution.
As a reference, this is the (trimmed) list of ubsan files I see on my system:
kamloops# locate libubsa | grep -v obj | grep -v src/external
/usr/lib/i386/libubsan.a
/usr/lib/i386/libubsan.so
/usr/lib/i386/libubsan.so.0
/usr/lib/i386/libubsan.so.0.0
/usr/lib/i386/libubsan_g.a
/usr/lib/i386/libubsan_p.a
/usr/lib/i386/libubsan_pic.a
/usr/lib/libubsan.a
/usr/lib/libubsan.so
/usr/lib/libubsan.so.0
/usr/lib/libubsan.so.0.0
/usr/lib/libubsan_g.a
/usr/lib/libubsan_p.a
/usr/lib/libubsan_pic.a
/usr/libdata/debug/usr/lib/i386/libubsan.so.0.0.debug
/usr/libdata/debug/usr/lib/libubsan.so.0.0.debug
On 8/1/16, Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> The following reply was made to PR lib/51363; it has been noted by GNATS.
>
> From: Joerg Sonnenberger <joerg%bec.de@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
> netbsd-bugs%netbsd.org@localhost, bch <brad.harder%gmail.com@localhost>
> Subject: Re: lib/51363: ubsan (undef behaviour sanitizer) faults
> Date: Mon, 1 Aug 2016 21:56:18 +0200
>
> On Mon, Aug 01, 2016 at 06:25:01PM +0000, David Holland wrote:
> > The following reply was made to PR lib/51363; it has been noted by
> GNATS.
> >
> > From: David Holland <dholland-bugs%netbsd.org@localhost>
> > To: gnats-bugs%NetBSD.org@localhost
> > Cc:
> > Subject: Re: lib/51363: ubsan (undef behaviour sanitizer) faults
> > Date: Mon, 1 Aug 2016 18:22:39 +0000
> >
> > On Sun, Jul 31, 2016 at 11:10:01PM +0000, bch wrote:
> > > This is something I don't understand --
> > >
> > > I'm using clang from pkgsrc, and there are *no* ubsan components
> > > installed that I can see. The clang documentation says that issuing
> > > -fsanitize=* might only instrument the code, or require a lib for
> > > runtime support. W/ the -fsanitize=undefined clang reports that it
> > > wants to be linked to ubsan, and linking (w/ clang, which is
> supposed
> > > to be used to pick the correct ubsan), still links as you see.
> >
> > Me either; unfortunately, I don't know much about it. I asked Joerg
> > and the only helpful information I was able to acquire is that it
> > shouldn't be using the gcc library.
> >
> > My guess would be that (maybe at config time when you built it) clang
> > detected the gcc libubsan and decided it should use that; or
> > alternatively it's just generating -lubsan and assuming the library
> > that finds is going to be the right one.
> >
> > I have no idea how it's supposed to work. Probably the best bet is to
> > find a clang list to ask on :-/
>
> It wasn't even clear from the start that this is about the pkgsrc clang.
> That one doesn't include any of the runtime libraries, so no ubsan
> either. It is expected to be available, the compiler driver itself
> doesn't check. There is currently no upstream support for any of the
> sanitizers for NetBSD. I've refrained so far from committing any time to
> it as the architecture is questionable (IMO) and the implementation of
> the system call stubs via syscall(2) is horrible too.
>
> Joerg
>
>
Home |
Main Index |
Thread Index |
Old Index