Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc 5.2 internal compiler error: Segmentation fault #134

Closed
renanbs opened this issue Nov 28, 2015 · 5 comments
Closed

gcc 5.2 internal compiler error: Segmentation fault #134

renanbs opened this issue Nov 28, 2015 · 5 comments

Comments

@renanbs
Copy link

renanbs commented Nov 28, 2015

Any ideas?
I'm using ArchLinux x86_64

Making all in .
make[5]: Entering directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
g++ -DHAVE_CONFIG_H   -fPIC -I../../..  -pthread -I/usr/include  -I../cpp -I../../../../gperftools-2.0.99/src -I/usr/include   -std=gnu++0x -MT gen-cpp2/libsaslstubs_a-Sasl_types.o -MD -MP -MF gen-cpp2/.deps/libsaslstubs_a-Sasl_types.Tpo -c -o gen-cpp2/libsaslstubs_a-Sasl_types.o `test -f 'gen-cpp2/Sasl_types.cpp' || echo './'`gen-cpp2/Sasl_types.cpp
In file included from gen-cpp2/Sasl_types.tcc:16:0,
                 from gen-cpp2/Sasl_types.cpp:9:
../../../thrift/lib/cpp2/GeneratedCodeHelper.h:931:43: internal compiler error: Segmentation fault
         typename GeneratedAsyncProcessor::ProcessFunc<
                                           ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
Makefile:1105: recipe for target 'gen-cpp2/libsaslstubs_a-Sasl_types.o' failed
make[5]: *** [gen-cpp2/libsaslstubs_a-Sasl_types.o] Error 1
make[5]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:1652: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:727: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:445: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib'
Makefile:526: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift'
Makefile:458: recipe for target 'all' failed
make: *** [all] Error 2
@djwatson
Copy link

djwatson commented Dec 1, 2015

"internal compiler error" - fun! Internally we're only on gcc 4.9, so we probably haven't run in to this yet.

@zihuyishi
Copy link

I remove the typename before the GeneratedAsyncProcessor::ProcessFunc make it compile.So it look like this

template <class ProtocolReader, class Processor>
void process_pmap(
    Processor* proc,
    const typename GeneratedAsyncProcessor::ProcessMap<
    GeneratedAsyncProcessor::ProcessFunc<
        Processor, ProtocolReader>> req,
.....and so on

i use gcc 5.2.1

@renanbs
Copy link
Author

renanbs commented Dec 21, 2015

That works! Thanks.

@tetsusoh
Copy link

tetsusoh commented Jan 5, 2016

+vote

@badair
Copy link

badair commented Mar 5, 2016

struct foo {
    template <typename T>
    using type = void(T::*)();
};

template <typename>
struct mf;

template <typename T>
struct mf<void(T::*)()> {
    // GCC 5.1, 5.2, and 5.3 will segfault when typename is
    // uncommented. GCC 4.9.2 and earlier do not segfault.
    using type = /*typename*/ foo::template type<T>;
};

int main() { return 0; }

Here is a standalone reproduction of the the bug, which was fixed in the GCC repo on 12/19/2015. I just wanted to leave some FYI since this issue thread is a top Google hit.

@juchem juchem closed this as completed Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants