Bug 6337 - php crash after include bcompiled file with class
Summary: php crash after include bcompiled file with class
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2012-06-05 10:25 CEST by Luděk Janča
Modified: 2013-11-22 16:52 CET (History)
5 users (show)

See Also:
Source RPM: php-bcompiler
CVE:
Status comment:


Attachments
test case (1.70 KB, application/x-bzip)
2012-06-05 10:29 CEST, Luděk Janča
Details

Description Luděk Janča 2012-06-05 10:25:22 CEST
Description of problem:
If I include bcompiled file php crashes.
Plain PHP works, but not with bcompiled source. 

I tried to build my own, but it work only with old 0.9.3 version and on only one server. I don't know why, but on other servers self compilation of 0.9.3 have same problems.

Main problem is with including bcompiled files containing classes.

With PHP CLI works OK everywhere including 1.0.2 from distribution package.



Version-Release number of selected component (if applicable):

php-bcompiler-1.0.2


How reproducible:
just run script

Steps to Reproduce:
1. urpmi apache apache-mpm-prefork apache-mod_php php-bcompiler
2. service httpd start
3. copy files from attachment to /var/www/html
4. run from browser http://localhost/testincl.php
Comment 1 Luděk Janča 2012-06-05 10:29:39 CEST
Created attachment 2427 [details]
test case

run testincl.php

files testcmp.php is bcompiled test.php file. testcmpx.y.z.php is bcompiled file with this version of bcompiler. index.php is compiler.
Comment 2 David Walser 2012-06-06 17:31:24 CEST
Could you try rebuilding php-bcompiler and see if that fixes it?

The procedure, if you haven't done this before, is:
1) Locate and download the source RPM from a mirror.
   It will be called php-bcompiler-1.0.2-2.mga2.src.rpm
2) (As root) urpmi php-bcompiler-1.0.2-2.mga2.src.rpm
   This will install the build dependencies.
3) rpmbuild --rebuild php-bcompiler-1.0.2-2.mga2.src.rpm
   This does the rebuild.
4) rpm -Uvh --force php-bcompiler-1.0.2-2.mga2.x86_64.rpm
   The path to the rpm that was built will be near the end of the
   output on the screen at the end of step 3.  This will install it.

CC: (none) => luigiwalser

Comment 3 Luděk Janča 2012-06-07 12:11:11 CEST
It's the same with rebuilded package. 

I found that if I install package php-eaccelerator, bcompiler 0.9.3 (my compilation) does not work too.
Comment 4 David Walser 2012-06-07 12:38:20 CEST
I don't think things like php-apc, php-eaccelerator, and php-bcompiler are meant to be used together.  Does php-bcompiler work by itself (either ours or your rebuilt one)?
Comment 5 Luděk Janča 2012-06-07 13:22:57 CEST
No, it doesn't. It works only with my compilation of 0.9.3. If I used distribution package or compiled version newer than 0.9.3, it doesn't work.
Comment 6 David Walser 2012-06-07 14:21:03 CEST
So rebuilding the package did work for you?  Or did you have to compile it some other way for it to work?
Comment 7 Luděk Janča 2012-06-07 15:09:11 CEST
As I wrote. Workable is only compiled version 0.9.3.

Rebuild of MGA package does not work.
Comment 8 David Walser 2012-06-07 15:20:42 CEST
I guess it might work on Mageia 1 since we still have 0.9.3 there.

Thomas, do you have any idea about this?

CC: (none) => thomas

Comment 9 Thomas Spuhler 2012-06-08 05:22:54 CEST
Im suffering on allergies and can hardly open my eyes.
Comment 10 Luděk Janča 2012-12-31 20:16:28 CET
Any news with this problem?
David Walser 2012-12-31 20:18:19 CET

CC: (none) => oe

Comment 11 Oden Eriksson 2012-12-31 22:10:55 CET
Works fine here on mga2 64bit.
Comment 12 Luděk Janča 2013-01-01 00:20:33 CET
Not for me. You must run index.php for compile script. And after that run testcmp.php.
Samuel Verschelde 2013-08-28 10:10:56 CEST

Keywords: (none) => Triaged
CC: (none) => stormi

Comment 13 Oden Eriksson 2013-08-28 11:27:06 CEST
Please try the latest php-bcompiler-1.0.3-0.svn316143.0.mga2 when it's there.
Comment 14 David Walser 2013-08-28 14:08:07 CEST
CC'ing QA.  We've asked the original reporter to test and verify that it works, but if anyone from QA wants to get a jump on testing it as well, you may.

CC: (none) => qa-bugs

Comment 15 claire robinson 2013-08-28 15:41:39 CEST
Before
------
index.php in a browser does nothing

# php index.php
Extensin loaded OK<hr>Segmentation fault

it does produce a testcmp.php though but viewing it in a browser does nothing


After
-----
rm testcmp.php

index.php in a browser still does nothing

# php index.php
Extensin loaded OK<hr>Segmentation fault

Viewing testcmp.php in a browser does nothing
Comment 16 claire robinson 2013-08-28 15:44:56 CEST
viewing testincl.php does nothing either. I think this should echo some 'stuff'.
Comment 17 claire robinson 2013-08-28 15:56:59 CEST
Testing with the code from here works ok with either version
http://php.net/manual/en/book.bcompiler.php
Comment 18 David Walser 2013-11-22 16:52:24 CET
Closing this now due to Mageia 2 EOL.

http://blog.mageia.org/en/2013/11/21/farewell-mageia-2/

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.