Bug#794475: clang-3.6: clang segfaults on invalid use of non-static data member

Lorenz Hübschle-Schneider lorenz-dev at lgh-alumni.de
Mon Aug 3 14:13:53 UTC 2015


reopen 794475 =
retitle 794475 clang segfaults on failed parameter substitution in
templated class or struct

Hi,

I've managed to come up with a small test case now and it's really quite
small:

-----------------------------
template <typename T>
struct test {
    test() { foo(); }
    void foo(int x = k) {}
};

int main() {
    test<int> w;
}
-----------------------------

the simplest possible invocation is enough to trigger the bug (clang++-3.6
foo.cpp)

The test case demonstrates that it's not the invalid use of a non-static
data member that causes this (there is no member k in test), but a failure
to substitute arguments. Since the crash does not occur if test isn't
templated, that probably has something to do with the issue as well.

I hope my usage of the BTS was correct.

Cheers,
Lorenz

On Mon, Aug 3, 2015 at 3:27 PM, Sylvestre Ledru <sylvestre at debian.org>
wrote:

> Le 03/08/2015 15:11, Lorenz Hübschle-Schneider a écrit :
> > Package: clang-3.6
> > Version: 1:3.6.2~+rc1-1~exp1
> > Severity: normal
> >
> >
> > Unfortunately I have not been able to isolate what causes the crash or to
> > produce a minimal example, and I can't share the original code (yet --
> it's
> > unpublished research).
> >
> Without a test case, I won't be able to do anything.
>
> Please reopen with a way to reproduce it... Sorry about that :(
> Maybe creduce (https://packages.debian.org/sid/creduce) could help you.
>
> Sylvestre
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20150803/64f9af38/attachment.html>


More information about the Pkg-llvm-team mailing list