Bug #18501: using suns CC with option '-fast' segfaults php.
| From: | berland at math dot ntnu dot no | Date: | Tue, 23 Jul 2002 16:41:53 +0000 |
| Subject: | Bug #18501: using suns CC with option '-fast' segfaults php. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14907@lists.php.net to get a copy of this message | ||
From: berland@math.ntnu.no
Operating system: Solaris 8
PHP version: 4.2.2
PHP Bug Type: *Compile Issues
Bug description: using suns CC with option '-fast' segfaults php.
I have been trying to compile php on a ultrasparc-II machine with Suns
compiler: Sun WorkShop 6 2000/04/07 C 5.1
I have set CFLAGS="-fast" to ensure native fast compilation. This is what
causes problems, I have no problems if -fast is not set.
Both the command line executable and the libphp4.so segfaults.
Here are two minimal files which reproduce the segfault here:
----bugtest.php----
<? include("buginclude.php");
stdheader("foobar");
?>
----/bugtest.php----
----buginclude.php----
<?
function stdheader ($title) {
}
?>
----/buginclude.php----
If the function stdheader is defined in bugtest.php, I receive no
segfault.
The last lines of truss-output follows:
-----trussoutput-----
resolvepath("/home/lastebil/e/berland/public_html/./buginclude.php",
"/home/lastebil/e/berland/public_html/buginclude.php", 1024) = 51
ioctl(7, TCGETA, 0xFFBEE23C) Err#25 ENOTTY
fstat64(7, 0xFFBEC990) = 0
ioctl(7, TCGETA, 0xFFBEC91C) Err#25 ENOTTY
read(7, " < ?\n f u n c t i o n ".., 8192) = 38
read(7, 0x00309AC4, 8192) = 0
ioctl(7, TCGETA, 0xFFBECAD4) Err#25 ENOTTY
llseek(7, 0, SEEK_CUR) = 38
close(7) = 0
Incurred fault #6, FLTBOUNDS %pc = 0x00137E5C
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
*** process killed ***
----trussoutput-----
Take contact if entire truss output is needed.
We do manage without the option -fast, but it would be
nice as we have noticed a significant speedup for some
applications.
gdb-backtrace: I am not sure whether this was successful, as it complains
heavily about missing debug symbols, even when I compiled with
--enable-debug, but here it is:
GDB 4.16 (sparc-sun-solaris2.3),
Copyright 1996 Free Software Foundation, Inc...(no debugging symbols
found)...
(gdb) set args ~berland/public_html/bugtest.php
(gdb) run
Starting program: /local/src/webserver/php-4.2.2/./php
~berland/public_html/bugtest.php
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x137e5c in execute ()
(gdb) bt
#0 0x137e5c in execute ()
#1 0x137a98 in execute ()
#2 0x109c6c in zend_execute_scripts ()
#3 0x334e4 in php_execute_script ()
#4 0x30060 in main ()
(gdb)
So, there you've got it, now you great volunteers may have a look at it if
it makes any sense! Keep up the good work!
--
Håvard Berland
System Administrator and PhD-student
Department of Mathematical Sciences
Norwegian University of Science and Technology
--
Edit bug report at http://bugs.php.net/?id=18501&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18501&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18501&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18501&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18501&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18501&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18501&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18501&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18501&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18501&r=globals