public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' @ 2021-01-11 17:01 marxin at gcc dot gnu.org 2021-01-11 17:02 ` [Bug c++/98626] " marxin at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: marxin at gcc dot gnu.org @ 2021-01-11 17:01 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98626 Bug ID: 98626 Summary: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: nathan at gcc dot gnu.org Blocks: 63426 Target Milestone: --- I see the following with UBSAN compiler: $ ./xg++ -B. /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/modules/mod-decl-2_a.C -c -fmodules-ts ... $ ./xg++ -B. /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/modules/mod-decl-2_b.C -c -fmodules-ts /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/modules/mod-decl-2_b.C:4:1: error: cannot import module in its own purview 4 | import bob; // { dg-error "cannot import module.* in its own purview" } | ^~~~~~ In module imported at /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/modules/mod-decl-2_b.C:4:1: bob: note: module ‘bob’ declared here /home/marxin/Programming/gcc2/gcc/cp/typeck.c:4024:33: runtime error: member call on null pointer of type 'struct vec' #0 0x1403445 in cp_build_function_call_vec(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int, tree_node*) /home/marxin/Programming/gcc2/gcc/cp/typeck.c:4024 #1 0xfdd5bf in module_add_import_initializers() /home/marxin/Programming/gcc2/gcc/cp/module.cc:18995 #2 0xdc20f9 in start_objects /home/marxin/Programming/gcc2/gcc/cp/decl2.c:3745 #3 0xdc4b3b in generate_ctor_or_dtor_function /home/marxin/Programming/gcc2/gcc/cp/decl2.c:4310 #4 0xdccb6c in c_parse_final_cleanups() /home/marxin/Programming/gcc2/gcc/cp/decl2.c:5234 #5 0x15ae87f in c_common_parse_file() /home/marxin/Programming/gcc2/gcc/c-family/c-opts.c:1233 #6 0x2ccb435 in compile_file /home/marxin/Programming/gcc2/gcc/toplev.c:457 #7 0x2cd3e17 in do_compile /home/marxin/Programming/gcc2/gcc/toplev.c:2193 #8 0x2cd441a in toplev::main(int, char**) /home/marxin/Programming/gcc2/gcc/toplev.c:2332 #9 0x59b3bff in main /home/marxin/Programming/gcc2/gcc/main.c:39 #10 0x7ffff6ce5151 in __libc_start_main (/lib64/libc.so.6+0x28151) #11 0xa82bdd in _start (/home/marxin/Programming/gcc2/objdir/gcc/cc1plus+0xa82bdd) Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426 [Bug 63426] [meta-bug] Issues found with -fsanitize=undefined ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98626] UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' 2021-01-11 17:01 [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' marxin at gcc dot gnu.org @ 2021-01-11 17:02 ` marxin at gcc dot gnu.org 2021-01-13 12:35 ` nathan at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: marxin at gcc dot gnu.org @ 2021-01-11 17:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98626 Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-01-11 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98626] UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' 2021-01-11 17:01 [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' marxin at gcc dot gnu.org 2021-01-11 17:02 ` [Bug c++/98626] " marxin at gcc dot gnu.org @ 2021-01-13 12:35 ` nathan at gcc dot gnu.org 2021-01-13 13:18 ` cvs-commit at gcc dot gnu.org 2021-01-13 13:35 ` nathan at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: nathan at gcc dot gnu.org @ 2021-01-13 12:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98626 Nathan Sidwell <nathan at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> --- magic configure: --with-build-config=bootstrap-ubsan ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98626] UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' 2021-01-11 17:01 [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' marxin at gcc dot gnu.org 2021-01-11 17:02 ` [Bug c++/98626] " marxin at gcc dot gnu.org 2021-01-13 12:35 ` nathan at gcc dot gnu.org @ 2021-01-13 13:18 ` cvs-commit at gcc dot gnu.org 2021-01-13 13:35 ` nathan at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-01-13 13:18 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98626 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>: https://gcc.gnu.org/g:11cbea852b0ae2b0f17a9caeaf6344d689231c2f commit r11-6647-g11cbea852b0ae2b0f17a9caeaf6344d689231c2f Author: Nathan Sidwell <nathan@acm.org> Date: Wed Jan 13 05:13:12 2021 -0800 c++: Fix cp_build_function_call_vec [PR 98626] I misunderstood the cp_build_function_call_vec API, thinking a NULL vector was an acceptable way of passing no arguments. You need to pass a vector of no elements. PR c++/98626 gcc/cp/ * module.cc (module_add_import_initializers): Pass a zero-element argument vector. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98626] UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' 2021-01-11 17:01 [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' marxin at gcc dot gnu.org ` (2 preceding siblings ...) 2021-01-13 13:18 ` cvs-commit at gcc dot gnu.org @ 2021-01-13 13:35 ` nathan at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: nathan at gcc dot gnu.org @ 2021-01-13 13:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98626 Nathan Sidwell <nathan at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> --- Fixed 11cbea852b0 2021-01-13 | c++: Fix cp_build_function_call_vec [PR 98626] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-13 13:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-11 17:01 [Bug c++/98626] New: UBSAN: vec.h:591:30: runtime error: member access within null pointer of type 'struct vec' marxin at gcc dot gnu.org 2021-01-11 17:02 ` [Bug c++/98626] " marxin at gcc dot gnu.org 2021-01-13 12:35 ` nathan at gcc dot gnu.org 2021-01-13 13:18 ` cvs-commit at gcc dot gnu.org 2021-01-13 13:35 ` nathan at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).