--- Comment #34 from gcc at troy dot rollo dot name 2007-03-06 03:51
---
The problem looks like a bug in GCC's optimisation in 4.1.1 - for the following
code:
152 while (--delete_count=0) {
153 zval *q = *(zval **)(--p);
154 *p =
--- Comment #35 from ebotcazou at gcc dot gnu dot org 2007-03-06 06:59
---
The problem looks like a bug in GCC's optimisation in 4.1.1 - for the
following code:
152 while (--delete_count=0) {
153 zval *q = *(zval **)(--p);
154
--- Comment #36 from ebotcazou at gcc dot gnu dot org 2007-03-06 06:59
---
As per previous analysis.
--
ebotcazou at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #37 from ebotcazou at gcc dot gnu dot org 2007-03-06 07:03
---
Thanks for investigating. The above code is illegal as per the ISO C standard
because it violates the type-based aliasing rules: you're not allowed to read
a void** object through a zval** lvalue
I meant a
--- Comment #30 from tony2001 at php dot net 2007-02-19 11:37 ---
GCC 4.1.2 produces PHP binary working perfectly fine.
I can see some problems in debug mode, when experimental heap protection is
enabled, but this it should be used only by developers anyway (and I'll try to
look into
--- Comment #31 from ebotcazou at gcc dot gnu dot org 2007-02-19 11:41
---
GCC 4.1.2 produces PHP binary working perfectly fine.
Thanks a lot for letting us know (and for your perseverance)!
I can see some problems in debug mode, when experimental heap protection is
enabled, but
--- Comment #32 from armin at xos dot net 2007-02-19 11:44 ---
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
GCC 4.1.2 produces PHP binary working perfectly fine.
I can see some problems in debug mode, when experimental heap protection is
enabled, but this it should be
--- Comment #33 from tony2001 at php dot net 2007-02-19 11:49 ---
(In reply to comment #32)
just for clarification. solaris 2.9 and 64bit output?
SunOS 5.8 Generic_108528-20 sun4u sparc SUNW,Sun-Blade-100
Compiling in 64bit mode, yes.
--
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-02-16 11:29 ---
Try building with -fno-strict-aliasing and/or with -fwrapv. If this fixes it
it is a bug in PHP. Also try 4.1.2 which was released a few days ago.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30819
--- Comment #2 from ebotcazou at gcc dot gnu dot org 2007-02-16 12:06
---
what's the information you need. how to produce a .i file - of which php
component?
You have to do half of the work, i.e. find out which part of the code has been
miscompiled. Could you try with 4.1.2 as
--- Comment #3 from armin at xos dot net 2007-02-16 12:23 ---
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
You have to do half of the work, i.e. find out which part of the code has been
miscompiled. Could you try with 4.1.2 as Richard suggested?
i used the above
--- Comment #4 from tony2001 at php dot net 2007-02-16 12:55 ---
Try building with -fno-strict-aliasing and/or with -fwrapv.
If this fixes it it is a bug in PHP.
Any hints on what it might be and why it's reproducible only on SPARC and GCC
4.x ?
--
tony2001 at php dot net
--- Comment #5 from ebotcazou at gcc dot gnu dot org 2007-02-16 13:06
---
i used the above cflags and it compiled well. and no segmentation faults
anymore.
I wouldn't personally recommend -fwrapv, this may uncover other problems. On
the contrary, -fno-strict-aliasing is always
--- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-02-16 13:12
---
Any hints on what it might be and why it's reproducible only on SPARC and GCC
4.x ?
If the trigger happens to be -fstrict-aliasing, it's very likely a violation of
the type-based aliasing rules of the C/C++
--- Comment #7 from armin at xos dot net 2007-02-16 14:00 ---
(In reply to comment #5)
i used the above cflags and it compiled well. and no segmentation faults
anymore.
I wouldn't personally recommend -fwrapv, this may uncover other problems. On
the contrary,
--- Comment #8 from tony2001 at php dot net 2007-02-16 14:16 ---
(In reply to comment #6)
If the trigger happens to be -fstrict-aliasing, it's very likely a violation
of
the type-based aliasing rules of the C/C++ languages. They are usually
exposed
by the scheduler, which is
--- Comment #9 from ebotcazou at gcc dot gnu dot org 2007-02-16 16:44
---
Do you mean it is some kind of improvement in GCC 4.x that makes the result
binary to segfault in random places when compiled without -fstrict-aliasing ?
No, -fstrict-aliasing is not new, it's there since GCC
--- Comment #10 from tony2001 at php dot net 2007-02-16 17:33 ---
That's why it would be interesting to try with the 4.1.2 release too.
Well, to do that I need to compile it first.
Still working on that - compiling GCC on Solaris is a big deal.
--
--- Comment #11 from ebotcazou at gcc dot gnu dot org 2007-02-16 17:41
---
Still working on that - compiling GCC on Solaris is a big deal.
That depends on what big deal means. :-) You just have to unpack the tarball
and follow the instructions at
--- Comment #12 from tony2001 at php dot net 2007-02-16 18:12 ---
Yes, sounds really easy. But the fact is that Solaris is very useful platform -
if there are any hidden bugs/problems/whatever, you can be sure you'll
encounter them on Solaris.
- native tar fails to unpack the archive
--- Comment #13 from ebotcazou at gcc dot gnu dot org 2007-02-16 18:32
---
- fastjar compilation requires makeinfo (had to patch Makefile to make it
work); see Bug 27822
Do not build Java.
- native sed doesn't work (had to install GNU sed);
GNU sed is not required.
- GNU sed
--- Comment #14 from armin at xos dot net 2007-02-16 18:40 ---
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
Use the Sun tools, read the instructions, build only C/C++.
that's how i did it:
CC=cc -xarch=v9 configure --prefix=/usr/local --enable-languages=c,c++
--- Comment #15 from tony2001 at php dot net 2007-02-16 18:53 ---
(In reply to comment #14)
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
Use the Sun tools
No Sun compilere here.
read the instructions, build only C/C++.
That's what I did.
CC=cc -xarch=v9
--- Comment #16 from ebotcazou at gcc dot gnu dot org 2007-02-16 19:00
---
No Sun compiler here.
The Sun tools are /usr/ccs/bin/as and /usr/ccs/bin/ld .
read the instructions, build only C/C++.
That's what I did.
Did you set CONFIG_SHELL?
--
--- Comment #17 from tony2001 at php dot net 2007-02-16 19:29 ---
(In reply to comment #13)
- fastjar compilation requires makeinfo (had to patch Makefile to make it
work); see Bug 27822
Do not build Java.
I didn't.
With --enable-languages={c,c++} it still builds fastjar.
Don't
--- Comment #18 from ebotcazou at gcc dot gnu dot org 2007-02-16 19:39
---
With --enable-languages={c,c++} it still builds fastjar.
Don't ask me why.
Something is very likely misconfigured.
You didn't set CONFIG_SHELL.
What should I set it to?
I guess GNU bash isn't good
--- Comment #19 from tony2001 at php dot net 2007-02-16 19:58 ---
You shouldn't need bison or m4 either.
Well, I just unpacked the tar, executed configure, make and got this error
message.
Using the recommended native binutils and GNU make.
Anything else?
--
--- Comment #20 from armin at xos dot net 2007-02-16 20:04 ---
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
did you set the shell it might be that /bin/sh is no bash but a ksh
and paths might be wrong in any of those...
--
--- Comment #21 from ebotcazou at gcc dot gnu dot org 2007-02-16 20:05
---
Well, I just unpacked the tar, executed configure, make and got this error
message.
And set CONFIG_SHELL? And configured outside the source directory?
--
--- Comment #22 from tony2001 at php dot net 2007-02-16 20:08 ---
(In reply to comment #20)
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
did you set the shell it might be that /bin/sh is no bash but a ksh
# $CONFIG_SHELL --version
GNU bash, version 2.03.0(1)-release
--- Comment #23 from ebotcazou at gcc dot gnu dot org 2007-02-16 20:12
---
# $CONFIG_SHELL --version
GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
Copyright 1998 Free Software Foundation, Inc.
IIRC old bash versions are buggy on Solaris. Just use /bin/ksh as recommended.
--- Comment #24 from tony2001 at php dot net 2007-02-16 20:41 ---
(In reply to comment #21)
Well, I just unpacked the tar, executed configure, make and got this error
message.
And set CONFIG_SHELL?
Ok, using ksh now.
And configured outside the source directory?
Why on earth
--- Comment #25 from ebotcazou at gcc dot gnu dot org 2007-02-16 20:46
---
Why on earth is this required?
Long story... :-)
Though, it still fails in the same place:
bison -y --name-prefix=__gettext --output plural.c
/space/tony/gcc-4.1.2/intl/plural.y
Puzzled. Try
--- Comment #26 from armin at xos dot net 2007-02-16 20:48 ---
Subject: Re: php 5.2.1 / gcc 4.1.1 / solaris 2.9 / 64 bit
did you unpack the source
make a directory for the build
go there
and do a ../???/configure xxx
snd not build in the unpacked dir?
maybe you have a strange version
--- Comment #27 from tony2001 at php dot net 2007-02-16 20:56 ---
(In reply to comment #25)
Why on earth is this required?
Long story... :-)
And a weird one, no doubt.
Puzzled. Try --disable-nls then.
I'll tell you the result in 10-15 minutes.
--
--- Comment #28 from ebotcazou at gcc dot gnu dot org 2007-02-16 21:00
---
And a weird one, no doubt.
Probably, but again it's fully documented.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30819
--- Comment #29 from tony2001 at php dot net 2007-02-16 22:26 ---
That seems to do the trick, lets see now if it's able to create working
binaries.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30819
37 matches
Mail list logo