[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-24 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45751

--- Comment #10 from Iain Sandoe iains at gcc dot gnu.org 2010-09-24 14:06:40 
UTC ---
Author: iains
Date: Fri Sep 24 14:06:35 2010
New Revision: 164592

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164592
Log:

PR bootstrap/45751
* gcc/config/darwin-driver.c (darwin_default_min_version):
Adjust size passed to memcpy in two places.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin-driver.c

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-24 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45751

Iain Sandoe iains at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #11 from Iain Sandoe iains at gcc dot gnu.org 2010-09-24 14:57:06 
UTC ---
fixed

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread dominiq at lps dot ens dot fr


--- Comment #3 from dominiq at lps dot ens dot fr  2010-09-23 08:39 ---
On powerpc-apple-darwin9 I get


[karma] gcc/darwin_buildw% gcc/xgcc -
Segmentation fault
[karma] gcc/darwin_buildw% gcc/xgcc -v
xgcc: warning: ­
xgcc(49989) malloc: *** mmap(size=3638091776) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

xgcc: out of memory allocating 3638090932 bytes after a total of 0 bytes


-- 

dominiq at lps dot ens dot fr changed:

   What|Removed |Added

 CC||iains at gcc dot gnu dot org
   Severity|normal  |blocker


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread iains at gcc dot gnu dot org


--- Comment #4 from iains at gcc dot gnu dot org  2010-09-23 09:34 ---
this appears to be to do with the driver construction of a default
macosx-version-min.

./gcc/xgcc -Bgcc -dumpspecs = bus error

./gcc/xgcc -Bgcc -dumpspecs -mmacosx-version-min=10.5 = completes normally.

Initial debugging suggests that the constructed option is being flagged as
error=4 (wrong language)


-- 


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread iains at gcc dot gnu dot org


--- Comment #5 from iains at gcc dot gnu dot org  2010-09-23 10:35 ---
if the array was intended to be an array of structs then this fixes:

Index: gcc/config/darwin-driver.c
===
--- gcc/config/darwin-driver.c  (revision 164549)
+++ gcc/config/darwin-driver.c  (working copy)
@@ -128,7 +128,7 @@ darwin_default_min_version (unsigned int *decoded_
   generate_option (OPT_mmacosx_version_min_, new_flag,
   1, CL_DRIVER, (*decoded_options)[1]);
   memcpy (*decoded_options + 2, argv + 1,
- (argc - 1) * sizeof (struct cl_decoded_option *));
+ (argc - 1) * sizeof (struct cl_decoded_option));
   return;

  parse_failed:


-- 


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread dominiq at lps dot ens dot fr


--- Comment #6 from dominiq at lps dot ens dot fr  2010-09-23 12:02 ---
 if the array was intended to be an array of structs then this fixes: ...

Currently at stage 2 for revision 164490 on powerpc-apple-darwin9 with the
patch in comment #5. Thanks.

Side question: what could be the meaning of sizeof (struct cl_decoded_option
*)?


-- 


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread dominiq at lps dot ens dot fr


--- Comment #7 from dominiq at lps dot ens dot fr  2010-09-23 14:14 ---
Bootstrapped revision 164560 on x86_64-apple-darwin10.4.0 with the following
patch:

--- ../_clean/gcc/config/darwin-driver.c2010-09-22 22:38:53.0
+0200
+++ gcc/config/darwin-driver.c  2010-09-23 14:13:53.0 +0200
@@ -76,7 +76,7 @@ darwin_default_min_version (unsigned int
generate_option (OPT_mmacosx_version_min_, macosx_deployment_target,
 1, CL_DRIVER, (*decoded_options)[1]);
memcpy (*decoded_options + 2, argv + 1,
-   (argc - 1) * sizeof (struct cl_decoded_option *));
+   (argc - 1) * sizeof (struct cl_decoded_option));
return;
   }
   }
@@ -128,7 +128,7 @@ darwin_default_min_version (unsigned int
   generate_option (OPT_mmacosx_version_min_, new_flag,
   1, CL_DRIVER, (*decoded_options)[1]);
   memcpy (*decoded_options + 2, argv + 1,
- (argc - 1) * sizeof (struct cl_decoded_option *));
+ (argc - 1) * sizeof (struct cl_decoded_option));
   return;

  parse_failed:


-- 


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2010-09-23 15:28 ---
Side question: what could be the meaning of sizeof (struct cl_decoded_option
*)?

The size of the pointer (which can be useful sometimes but not in this case).


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||build, ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2010-09-23 15:28:36
   date||


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-23 Thread dominiq at lps dot ens dot fr


--- Comment #9 from dominiq at lps dot ens dot fr  2010-09-23 15:30 ---
Could someone commit the patch in comment #7. It cannot make the matter worse
than it is without it.
TIA


-- 


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-22 Thread dominiq at lps dot ens dot fr


--- Comment #1 from dominiq at lps dot ens dot fr  2010-09-22 22:30 ---
Same thing on powerpc-apple-darwin9.


-- 

dominiq at lps dot ens dot fr changed:

   What|Removed |Added

  GCC build triplet|x86_64-apple-darwin10.4.0   |*-apple-darwin*
   GCC host triplet|x86_64-apple-darwin10.4.0   |*-apple-darwin*
 GCC target triplet|x86_64-apple-darwin10.4.0   |*-apple-darwin*


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



[Bug bootstrap/45751] [4.6 Regression] Bootstrap failure: at stage 1 xgcc segfault

2010-09-22 Thread howarth at nitro dot med dot uc dot edu


--- Comment #2 from howarth at nitro dot med dot uc dot edu  2010-09-23 
00:11 ---
Caused by...


Author: jsm28
Date: Wed Sep 22 20:19:39 2010
New Revision: 164532

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164532
Log:
* opts-common.c (prune_options): Make static.  Work with decoded
options.
(decode_cmdline_options_to_array): Call prune_options.  Don't
resize option array here.
* opts.h (prune_options): Remove prototype.
* gcc.c (process_command): Take decoded options; don't call
decode_cmdline_options_to_array here.  Use decoded options for
argv[0].
(main): Call decode_cmdline_options_to_array here instead of
prune_options.  Update call to process_command.
* config/darwin-driver.c: Include opts.h.
(darwin_default_min_version): Work with decoded options.  Don't
handle -b or -V here.
* config/darwin.h (darwin_default_min_version): Update prototype.
(GCC_DRIVER_HOST_INITIALIZATION): Update call to
darwin_default_min_version.
* config/i386/cygwin.h (mingw_scan): Update prototype.
(GCC_DRIVER_HOST_INITIALIZATION): Update call to mingw_scan.
* config/i386/cygwin1.c: Include opts.h.
(mingw_scan): Work with decoded options.
* config/i386/t-cygwin (cygwin1.o): Update dependencies.
* config/t-darwin (darwin-driver.o): Update dependencies.

According to original patch this was never tested directly on darwin...

http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01007.html


-- 


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