public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/41217]  New: Driver crashes if -o specified without filename
@ 2009-09-01 19:22 rmansfield at qnx dot com
  2009-09-29  3:08 ` [Bug driver/41217] [4.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rmansfield at qnx dot com @ 2009-09-01 19:22 UTC (permalink / raw)
  To: gcc-bugs

$ ./xgcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-languages=c 
Thread model: posix
gcc version 4.5.0 20090901 (experimental) [trunk revision 151276] (GCC)

$ ./xgcc -B. -o
Segmentation fault

(gdb) bt
#0  0xb7f43613 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0x08065b27 in xstrdup (s=0x0) at ../../libiberty/xstrdup.c:33
#2  0x0804f55e in process_command (argc=3, argv=0x9ff62b8)
    at ../../gcc/gcc.c:4164
#3  0x0805720f in main (argc=3, argv=0xbfe5d574) at ../../gcc/gcc.c:6823

Introduced by http://gcc.gnu.org/viewcvs?view=revision&revision=145470

Only happens in gcc 4.5.0.

Index: gcc.c
===================================================================
--- gcc.c       (revision 151276)
+++ gcc.c       (working copy)
@@ -4161,7 +4161,10 @@
                argv[i] = convert_filename (argv[i], ! have_c, 0);
 #endif
              /* Save the output name in case -save-temps=obj was used.  */
-             save_temps_prefix = xstrdup ((p[1] == 0) ? argv[i + 1] : argv[i]
+ 1);
+             if ((p[1] == 0) &&  argv[i + 1])
+               save_temps_prefix = xstrdup(argv[i + 1]);
+              else
+               save_temps_prefix = xstrdup(argv[i] + 1);
              goto normal_switch;

            default:


-- 
           Summary: Driver crashes if -o specified without filename
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmansfield at qnx dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

* [Bug driver/41217] [4.5 Regression] Driver crashes if -o specified without filename
  2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
@ 2009-09-29  3:08 ` pinskia at gcc dot gnu dot org
  2009-09-29  3:09 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-09-29  3:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-09-29 03:07 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
            Summary|Driver crashes if -o        |[4.5 Regression] Driver
                   |specified without filename  |crashes if -o specified
                   |                            |without filename
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

* [Bug driver/41217] [4.5 Regression] Driver crashes if -o specified without filename
  2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
  2009-09-29  3:08 ` [Bug driver/41217] [4.5 Regression] " pinskia at gcc dot gnu dot org
@ 2009-09-29  3:09 ` pinskia at gcc dot gnu dot org
  2009-09-30 20:08 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-09-29  3:09 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2009-
                   |                            |09/msg00068.html
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |patch
   Last reconfirmed|0000-00-00 00:00:00         |2009-09-29 03:08:45
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

* [Bug driver/41217] [4.5 Regression] Driver crashes if -o specified without filename
  2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
  2009-09-29  3:08 ` [Bug driver/41217] [4.5 Regression] " pinskia at gcc dot gnu dot org
  2009-09-29  3:09 ` pinskia at gcc dot gnu dot org
@ 2009-09-30 20:08 ` rguenth at gcc dot gnu dot org
  2009-10-06  9:33 ` rguenth at gcc dot gnu dot org
  2009-10-06 10:14 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-30 20:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

* [Bug driver/41217] [4.5 Regression] Driver crashes if -o specified without filename
  2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
                   ` (2 preceding siblings ...)
  2009-09-30 20:08 ` rguenth at gcc dot gnu dot org
@ 2009-10-06  9:33 ` rguenth at gcc dot gnu dot org
  2009-10-06 10:14 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-06  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-10-06 09:33 -------
Subject: Bug 41217

Author: rguenth
Date: Tue Oct  6 09:33:29 2009
New Revision: 152488

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152488
Log:
2009-10-06  Ryan Mansfield  <rmansfield@qnx.com>

        PR driver/41217
        * gcc.c (process_command): Check that -o argument was specified.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

* [Bug driver/41217] [4.5 Regression] Driver crashes if -o specified without filename
  2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
                   ` (3 preceding siblings ...)
  2009-10-06  9:33 ` rguenth at gcc dot gnu dot org
@ 2009-10-06 10:14 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-06 10:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-10-06 10:13 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41217


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

end of thread, other threads:[~2009-10-06 10:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-01 19:22 [Bug driver/41217] New: Driver crashes if -o specified without filename rmansfield at qnx dot com
2009-09-29  3:08 ` [Bug driver/41217] [4.5 Regression] " pinskia at gcc dot gnu dot org
2009-09-29  3:09 ` pinskia at gcc dot gnu dot org
2009-09-30 20:08 ` rguenth at gcc dot gnu dot org
2009-10-06  9:33 ` rguenth at gcc dot gnu dot org
2009-10-06 10:14 ` rguenth at gcc dot gnu dot 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).