https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78629
Bug ID: 78629 Summary: vec.h: null pointer passed as argument 1, which is declared to never be null Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: prathamesh3492 at gcc dot gnu.org Target Milestone: --- build/genmatch --gimple match.pd gives following runtime error when it's built with ubsan: ../../gcc/gcc/vec.h:1609:3: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/x86_64-linux-gnu/bits/string3.h:90:70: runtime error: null pointer passed as argument 1, which is declared to never be null GIMPLE decision tree has 1846 leafs, maximum depth 12 and a total number of 7248 nodes removed 1070 duplicate tails ../../gcc/gcc/vec.h:1609:3: runtime error: null pointer passed as argument 1, which is declared to never be null #0 0x44fb51 in vec<vec<capture*, va_heap, vl_ptr>, va_heap, vl_ptr>::safe_grow_cleared(unsigned int) ../../gcc/gcc/vec.h:1609 #1 0x44fb51 in parser::finish_match_operand(operand*) ../../gcc/gcc/genmatch.c:4801 #2 0x45d597 in parser::parse_simplify(simplify::simplify_kind, vec<simplify*, va_heap, vl_ptr>&, predicate_id*, operand*) ../../gcc/gcc/genmatch.c:4433 #3 0x45e70b in parser::parse_pattern() ../../gcc/gcc/genmatch.c:4745 #4 0x466213 in parser::parser(cpp_reader*) ../../gcc/gcc/genmatch.c:4855 #5 0x40a899 in main ../../gcc/gcc/genmatch.c:4953 #6 0x7fafc65e982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #7 0x40bbd8 in _start (/home/bilbo/gnu-toolchain/gcc/master/ubsan-stage1-build/gcc/build/genmatch+0x40bbd8) Thanks, Prathamesh