http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53026
Bug #: 53026 Summary: segfault in pt.c: lookup_template_class Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: matti...@yahoo.co.uk HEADLINE: pt.c:7595 - "Address 0x3 is not stack'd, malloc'd..." user@host:~$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.8.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc-svn/configure : (reconfigured) ../gcc-svn/configure : (reconfigured) ../gcc-svn/configure --enable-languages=c,c++,fortran,java,lto,objc --no-create --no-recursion : (reconfigured) ../gcc-svn/configure --enable-languages=c++ : (reconfigured) ../gcc-svn/configure --enable-languages=c,c++,lto --no-create --no-recursion : (reconfigured) ../gcc-svn/configure --enable-languages=c,c++,lto --no-create --no-recursion : (reconfigured) ../gcc-svn/configure --enable-languages=c,c++,lto --no-create --no-recursion Thread model: posix gcc version 4.8.0 20120417 (experimental) (GCC) (built, I believe, at revision 186523) It would take some effort to construct minimal code to reproduce this segfault, but the following details are available now... user@host:~$ valgrind /path/to/cc1plus -std=c++11 -O2 -g0 -Wall ... ... ==18469== at 0x81915D1: lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) (pt.c:7595) ==18469== by 0x8194504: tsubst_aggr_type(tree_node*, tree_node*, int, tree_node*, int) (pt.c:9876) ==18469== by 0x819FB2A: tsubst(tree_node*, tree_node*, int, tree_node*) (pt.c:11662) ==18469== by 0x81B1E1E: tsubst_arg_types(tree_node*, tree_node*, int, tree_node*) (pt.c:10844) ==18469== by 0x81B1D04: tsubst_arg_types(tree_node*, tree_node*, int, tree_node*) (pt.c:10814) ==18469== by 0x81B219A: tsubst_function_type(tree_node*, tree_node*, int, tree_node*) (pt.c:10940) ==18469== by 0x819F676: tsubst(tree_node*, tree_node*, int, tree_node*) (pt.c:11599) ==18469== by 0x81A862D: tsubst_decl(tree_node*, tree_node*, int) (pt.c:10247) ==18469== by 0x81A01E4: tsubst(tree_node*, tree_node*, int, tree_node*) (pt.c:11111) ==18469== by 0x81AA6B4: tsubst_decl(tree_node*, tree_node*, int) (pt.c:10094) ==18469== by 0x81A01E4: tsubst(tree_node*, tree_node*, int, tree_node*) (pt.c:11111) ==18469== by 0x81D087F: instantiate_class_template(tree_node*) (pt.c:8935) ==18469== Address 0x3 is not stack'd, malloc'd or (recently) free'd ==18469==