public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/95456] New: [11 Regression] gcc/gcc.c:6035:16: runtime error: null pointer passed as argument 2, which is declared to never be null
@ 2020-06-01  8:30 marxin at gcc dot gnu.org
  2020-06-01  8:31 ` [Bug driver/95456] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-01  8:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95456

            Bug ID: 95456
           Summary: [11 Regression] gcc/gcc.c:6035:16: runtime error: null
                    pointer passed as argument 2, which is declared to
                    never be null
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: aoliva at gcc dot gnu.org
            Blocks: 63426
  Target Milestone: ---

Since the Alexander's changes I see:

$ diff --git a/gcc/gcc.c b/gcc/gcc.c
index e2362175f40..44090a8e713 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6032,8 +6032,11 @@ do_spec_1 (const char *spec, int inswitch, const char
*soft_matched_part)
                    if (dumpdir_length)
                      memcpy (tmp, dumpdir, dumpdir_length);
                    if (!outbase_length)
+                     {
+                       gcc_assert (input_basename);
                      memcpy (tmp + dumpdir_length, input_basename,
                              basename_length);
+                     }
                    else
                      memcpy (tmp + dumpdir_length, outbase,
                              outbase_length);

$ ./xgcc -B. /tmp/foo.c --save-temps
xgcc: internal compiler error: in do_spec_1, at gcc.c:6036
0x403cea do_spec_1
        /home/marxin/Programming/gcc/gcc/gcc.c:6036
0x4130a1 process_brace_body
        /home/marxin/Programming/gcc/gcc/gcc.c:7122


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] 8+ messages in thread

end of thread, other threads:[~2020-06-06  1:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01  8:30 [Bug driver/95456] New: [11 Regression] gcc/gcc.c:6035:16: runtime error: null pointer passed as argument 2, which is declared to never be null marxin at gcc dot gnu.org
2020-06-01  8:31 ` [Bug driver/95456] " marxin at gcc dot gnu.org
2020-06-02  7:34 ` rguenth at gcc dot gnu.org
2020-06-02  9:03 ` marxin at gcc dot gnu.org
2020-06-03  5:49 ` marxin at gcc dot gnu.org
2020-06-04  7:40 ` aoliva at gcc dot gnu.org
2020-06-06  1:42 ` cvs-commit at gcc dot gnu.org
2020-06-06  1:54 ` aoliva 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).