php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32538 ext/swf/swf.c does not compile with gcc-3.4.x or newer
Submitted: 2005-04-01 21:01 UTC Modified: 2005-04-02 08:03 UTC
From: adam dot greenfield at gmail dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.11 OS: Linux (Fedora Core 3)
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: adam dot greenfield at gmail dot com
New email:
PHP Version: OS:

 

 [2005-04-01 21:01 UTC] adam dot greenfield at gmail dot com
Description:
------------
PHP 4.3.11 will not compile on machines using gcc-3.4.x (in this case, gcc-3.4.2)

Reproduce code:
---------------
kronos% ./configure --with-swf=/usr
... (normal configure output - no errors) ...
kronos% make
... (normal make output) ...
gcc  -Iext/swf/ -I/home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/ -DPHP_ATOM_INC -I/home/adam/build/packages/dsmphp/php-4.3.11/include -I/home/adam/build/packages/dsmphp/php-4.3.11/main -I/home/adam/build/packages/dsmphp/php-4.3.11 -I/home/adam/build/packages/dsmphp/php-4.3.11/ext/xml/expat -I/home/adam/build/packages/dsmphp/php-4.3.11/TSRM -I/home/adam/build/packages/dsmphp/php-4.3.11/Zend   -g -O2  -c /home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c -o ext/swf/swf.o  && echo > ext/swf/swf.lo
/home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c: In function `zif_swf_openfile':
/home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c:256: error: label at end of compound statement
make: *** [ext/swf/swf.lo] Error 1
kronos% 

Expected result:
----------------
PHP Compiles

Actual result:
--------------
Compile failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-01 21:03 UTC] adam dot greenfield at gmail dot com
Here is a patch I've made, it corrected this issue on my systems:

diff -Naur php-4.3.11.orig/ext/swf/swf.c php-4.3.11/ext/swf/swf.c
--- php-4.3.11.orig/ext/swf/swf.c       2004-12-23 13:29:36.000000000 -0500
+++ php-4.3.11/ext/swf/swf.c    2005-04-01 13:32:16.540010608 -0500
@@ -240,7 +240,10 @@
        na = tmpna;
 #endif
        if (php_check_open_basedir(na TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(na, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
-               goto err;
+#ifdef VIRTUAL_DIR
+           free(na);
+#endif
+               return;
        }

        if (!SWFG(use_file))
@@ -249,10 +252,6 @@
        swf_openfile(na,(float)Z_DVAL_PP(sizeX), (float)Z_DVAL_PP(sizeY),
                         (float)Z_DVAL_PP(frameRate), (float)Z_DVAL_PP(r),
                         (float)Z_DVAL_PP(g), (float)Z_DVAL_PP(b));
-err:
-#ifdef VIRTUAL_DIR
-       free(na);
-#endif
 }
 /* }}} */
 [2005-04-01 21:27 UTC] adam dot greenfield at gmail dot com
After seeking advice on the best way to submit patches, I've made a diff -dpu patch of swf.c and posted it at http://people.jtlnet.com/~adam/phpbug-32538/swf.c.patch
 [2005-04-02 08:03 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

And you really should use anything else than this extension..
for example ext/ming

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