php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30012 php exits with SEGFAULT (swf creation related)
Submitted: 2004-09-07 17:25 UTC Modified: 2004-09-14 18:59 UTC
From: oby at mangachicks dot org Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.3.8 OS: Linux
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: oby at mangachicks dot org
New email:
PHP Version: OS:

 

 [2004-09-07 17:25 UTC] oby at mangachicks dot org
Description:
------------
Trying to generate a swf file led to a segmentation fault.
(used the example found on your webpage http://www.php.net/manual/en/ref.swf.php)

here is the configure line:
'./configure' '--prefix=/usr/local/php4' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-exec-dir=/usr/local/php4/bin' '--with-mysql' '--with-zlib' '--with-gd' '--with-swf=/home/oby/work/dist' '--with-pear' '--with-jpeg-dir=/usr/lib'

Only thing changed in the php.ini was allow_call_time_pass_reference (was ON, changed it to OFF)

Reproduce code:
---------------
It is the Example 1. SWF Example from the php.net website
http://www.php.net/manual/en/ref.swf.php

Expected result:
----------------
Not very sure, but not a segmentation fault :)

Actual result:
--------------
Starting program: /usr/local/php4/bin/php /var/www/html/flash_php/index.php

Program received signal SIGSEGV, Segmentation fault.
0x4013d121 in vfprintf () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4013d121 in vfprintf () from /lib/i686/libc.so.6
#1  0x4013cb46 in vfprintf () from /lib/i686/libc.so.6
#2  0x401422fd in fprintf () from /lib/i686/libc.so.6
#3  0x081686a0 in ss_0161 ()
#4  0x0816399f in swf_definefont ()
#5  0x0810975b in zif_swf_definefont (ht=2, return_value=0x8225f04, this_ptr=0x0, return_value_used=0) at /root/stuff/php-4.3.8/ext/swf/swf.c:843
#6  0x0815c98e in execute (op_array=0x8220f4c) at /root/stuff/php-4.3.8/Zend/zend_execute.c:1635
#7  0x0814f597 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/stuff/php-4.3.8/Zend/zend.c:891
#8  0x08127b1f in php_execute_script (primary_file=0xbffff7c0) at /root/stuff/php-4.3.8/main/main.c:1734
#9  0x08161845 in main (argc=2, argv=0xbffff854) at /root/stuff/php-4.3.8/sapi/cli/php_cli.c:822
#10 0x4010b082 in __libc_start_main () from /lib/i686/libc.so.6


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-07 17:33 UTC] oby at mangachicks dot org
Me again, problem seems to be caused by

swf_definefont(10, "Mod");

and

swf_definetext(11, "This be Flash wit PHP!", 1);

removed those lines and the swf file got generated with the desired effect.
 [2004-09-14 18:59 UTC] oby at mangachicks dot org
Right, well i guess that was my bad or something, it works just fine if i place the fonts/ dir in the working folder of the application. From my point of view this bug report is absolete, but there should be a way other then symlinking or  placing the fonts/ dir in the working folder.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 10:01:24 2019 UTC