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

* [Bug driver/95456] [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 [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 ` marxin at gcc dot gnu.org
  2020-06-02  7:34 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-01  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
      Known to work|                            |10.1.0
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-06-01
      Known to fail|                            |11.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-02  7:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-02  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-03  5:49 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: aoliva at gcc dot gnu.org @ 2020-06-04  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |aoliva at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #1 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 48673
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48673&action=edit
patch I'm testing

Here's the patch I'm testing

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-06  1:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:2e6a6644db0ef0f369df4e5b1b337122d84c1a39

commit r11-1014-g2e6a6644db0ef0f369df4e5b1b337122d84c1a39
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jun 5 22:31:19 2020 -0300

    [PR95456] avoid memcpy (_, NULL, 0) in gcc.c

    Some newly-added code in gcc.c might call memcpy with a NULL source
    pointer and zero-length inputs.  Avoid such calls by rearranging the
    code a little.


    for  gcc/ChangeLog

            PR driver/95456
            * gcc.c (do_spec_1): Don't call memcpy (_, NULL, 0).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug driver/95456] [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 [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
                   ` (5 preceding siblings ...)
  2020-06-06  1:42 ` cvs-commit at gcc dot gnu.org
@ 2020-06-06  1:54 ` aoliva at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: aoliva at gcc dot gnu.org @ 2020-06-06  1:54 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
fixed

^ 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).