php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19671 64bit compilation fails (zend_execute.c)
Submitted: 2002-09-30 05:10 UTC Modified: 2002-11-21 17:07 UTC
From: Manfred dot Metz at rsd dot rohde-schwarz dot com Assigned: jason (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 4.2.3 OS: Solaris 2.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Manfred dot Metz at rsd dot rohde-schwarz dot com
New email:
PHP Version: OS:

 

 [2002-09-30 05:10 UTC] Manfred dot Metz at rsd dot rohde-schwarz dot com
When compiling php in 64bit mode and statically linked to Apache then you'll receive an error that libphp.a is a 32bit library archive. Only the zend_execute.o ist 32bit, all others are correct.

In the Zend Makefile for zend_execute.c the CFLAGS are missing! 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 06:11 UTC] kalowsky@php.net
jason just made a post to the PHP-dev list about this, with a patch to allow this to work.  Can you try applying it and seeing if things work for you alright?

Sorry I don't have a link handy, but here's the general info:
Posted by Jason Greene, Sept 25, 2002.  Topic: [PHP-DEV] [PATCH] 64 bit PHP (long vs int problems)
 [2002-09-30 06:26 UTC] nohn@php.net
Similar to http://bugs.php.net/bug.php?id=18640 ?
 [2002-09-30 07:47 UTC] kalowsky@php.net
no this is a bit different I believe sebastian.
 [2002-10-01 02:09 UTC] Manfred dot Metz at rsd dot rohde-schwarz dot com
The problem is a bit more complicated I think. I believe there is a problem in the Zend Makefile. The behaviour is different when using the Forte C compiler (Version 7) from SUN. Then every objectfile is compiled correct as 64bit obectfile. Only with gcc (Version 3.2) I'll result in this error.

By the way. My feeling is that there is some unclean 64bit code in the PHP source. I'm just evaluating the reason for a Bus Error during PHP scripting.
 [2002-10-01 07:07 UTC] kalowsky@php.net
Yes Zend is optimized for 32bit systems, but we have gotten it running on 64bit systems.  

It still stands, have you tried the patch provided by Jason Greene?

In any case I'll make this as assigned to him since he has a patch started to take care of this.
 [2002-10-01 07:39 UTC] Manfred dot Metz at rsd dot rohde-schwarz dot com
Yes I tried to apply the patch, but there is no chance to apply the Patch to php-4.2.3 because most of the code is rewritten in 4.2.3. Can you tell me to which php Version this patch belongs?

My testings about the Bus error point to some inconsistency in ext/standard/url_scanner_ex.c here is the dbx output:

(dbx) cont
t@1 (l@1) signal BUS (invalid address alignment) in url_adapt_ext_ex at line 804 in file "url_scanner_ex.c"
  804           *newlen = ctx->result.len;
(dbx) where
current thread: t@1
=>[1] url_adapt_ext_ex(src = 0x100749350 "<html> \n<head> \n\n<LINK REL="stylesheet" HREF="/ps/ps-style.css" TYPE="text/css">  \n\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n<title></title> \n</head> \n<body text="#000000" bgcolor="#FFFFFF" <br />\n<b>Notice</b>:  Undefined variable:  bgpic in <b>/usr/local/powerslave/ps/inc/intern/pslogo.inc</b> on line <b>12</b><br />\n link="#0000EE" vlink="#551A8B" alink="#FF0000"> \n<font   size=-1 face="Arial,Helvetica"> \n<center><a" ..., srclen = 4129U, name = 0x100453b40 "PHPSESSID", value = 0x100594a40 "187e98753d41ead77bf427a248f4173a", newlen = 0xffffffff7fff725c, do_flush = '\0'), line 804 in "url_scanner_ex.c"
  [2] php_session_output_handler(output = 0x100749350 "<html> \n<head> \n\n<LINK REL="stylesheet" HREF="/ps/ps-style.css" TYPE="text/css">  \n\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> \n<title></title> \n</head> \n<body text="#000000" bgcolor="#FFFFFF" <br />\n<b>Notice</b>:  Undefined variable:  bgpic in <b>/usr/local/powerslave/ps/inc/intern/pslogo.inc</b> on line <b>12</b><br />\n link="#0000EE" vlink="#551A8B" alink="#FF0000"> ^M\n<font   size=-1 face="Arial,Helvetica"> ^M\n<center><a" ..., output_len = 4129U, handled_output = 0xffffffff7fff7260, handled_output_len = 0xffffffff7fff725c, mode = 3), line 87 in "session.c"
  [3] php_end_ob_buffer(send_buffer = '\001', just_flush = '\001'), line 160 in "output.c"
  [4] php_ob_append(text = 0xffffffff7fff758c "<br />\n<b>Notice</b>:  Undefined variable:  layout_func in <b>/usr/local/powerslave/ps/inc/filemgr.inc</b> on line <b>3</b><br />\n", text_length = 130U), line 379 in "output.c"
  [5] php_b_body_write(str = 0xffffffff7fff758c "<br />\n<b>Notice</b>:  Undefined variable:  layout_func in <b>/usr/local/powerslave/ps/inc/filemgr.inc</b> on line <b>3</b><br />\n", str_length = 130U), line 439 in "output.c"
  [6] php_body_write(str = 0xffffffff7fff758c "<br />\n<b>Notice</b>:  Undefined variable:  layout_func in <b>/usr/local/powerslave/ps/inc/filemgr.inc</b> on line <b>3</b><br />\n", str_length = 130U), line 101 in "output.c"
  [7] php_printf(format = 0x1004161c0 "<br />\n<b>%s</b>:  %s in <b>%s</b> on line <b>%d</b><br />\n", ...), line 355 in "main.c"
  [8] php_error_cb(type = 8, error_filename = 0x100ff7830 "/usr/local/powerslave/ps/inc/filemgr.inc", error_lineno = 3U, format = 0x1002eb8f8 "Undefined variable:  %s", args = 0xffffffff7fff9090), line 479 in "main.c"
  [9] zend_error(type = 8, format = 0x1002eb8f8 "Undefined variable:  %s", ...), line 684 in "zend.c"
  [10] zend_fetch_var_address(opline = 0x10103fdd0, Ts = 0xffffffff7fff91c8, type = 0), line 563 in "zend_execute.c"
  [11] execute(op_array = 0x100ff7740), line 1235 in "zend_execute.c"
  [12] execute(op_array = 0x100822100), line 2141 in "zend_execute.c"
  [13] execute(op_array = 0x10080f120), line 2141 in "zend_execute.c"
  [14] execute(op_array = 0x10077d060), line 2141 in "zend_execute.c"
  [15] execute(op_array = 0x1004f0590), line 2141 in "zend_execute.c"
  [16] zend_execute_scripts(type = 8, retval = (nil), file_count = 3, ...), line 812 in "zend.c"
  [17] php_execute_script(primary_file = 0xffffffff7fffec58), line 1383 in "main.c"
  [18] apache_php_module_main(r = 0x1004e18d0, display_source_mode = 0), line 90 in "sapi_apache.c"
  [19] send_php(0x1004e18d0, 0x0, 0x0, 0x0, 0x0, 0x100457428), at 0x1000638dc
  [20] send_parsed_php(0x1004e18d0, 0x1002de4d7, 0xffffffffffffffff, 0x0, 0x70, 0x70), at 0x100063990
  [21] ap_invoke_handler(0x1004e18d0, 0x0, 0x17, 0x1f4, 0x1004e2678, 0x10045b5d0), at 0x100269d88
  [22] process_request_internal(0x1004e18d0, 0x1004e03f0, 0x1004e18a0, 0x0, 0x1004e18d0, 0x0), at 0x10028c124
  [23] ap_internal_redirect(0x1004e18a0, 0x1004e03f0, 0x1, 0x1004e2dc6, 0x0, 0x1004e18ae), at 0x10028c538
  [24] handle_dir(0x1004e03f0, 0x0, 0xffffffffffffffff, 0x1004e18a0, 0x1, 0x1004e2420), at 0x100262398
  [25] ap_invoke_handler(0x1004e03f0, 0x0, 0x14, 0x1f4, 0x1002ec2d0, 0x10045b618), at 0x100269d88
  [26] process_request_internal(0x1004e03f0, 0xffffffff7bf00000, 0x1004e1148, 0x0, 0x1004e0670, 0x0), at 0x10028c124
  [27] ap_process_request(0x1004e03f0, 0x4, 0x1004e03f0, 0x0, 0x1004e03f0, 0x1004e03f0), at 0x10028c1c8
  [28] child_main(0x0, 0x10027b100, 0xffffffff7c234798, 0xffffffff7c22d6b8, 0xffffffff7c223ef8, 0xffffffff7c223eb8), at 0x10027e5d0
  [29] make_child(0x100456050, 0x0, 0x3d997667, 0xffffffff7cfb8700, 0xffffffff7cfb8700, 0xffffffff7cfb8700), at 0x10027eb00
  [30] perform_idle_server_maintenance(0xffffffffffffffff, 0x0, 0x0, 0x100456050, 0x1002f1320, 0xffffffff7ffffa08), at 0x10027f230
  [31] standalone_main(0x1, 0xffffffff7ffffc38, 0x100411600, 0x0, 0x10046e8e0, 0x0), at 0x10027ffec
  [32] main(0x1, 0xffffffff7ffffc38, 0xffffffff7ffffc48, 0x0, 0x0, 0x100000000), at 0x100281004
 [2002-10-01 12:12 UTC] kalowsky@php.net
I believe it's for CVS head... 
 [2002-11-08 09:49 UTC] iliaa@php.net
I've compiled the latest CVS on a 64 bit Sun OS without any problems. I am guessing that the problem may have been fixed...
Could you please try the latest cvs and see if you still experience the problem?
 [2002-11-08 12:04 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-11-21 17:07 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC