php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56963 SIGBUS on ANY use of extension
Submitted: 2006-04-19 10:40 UTC Modified: 2008-07-01 12:25 UTC
From: ler at lerctr dot org Assigned:
Status: Closed Package: xdiff (PECL)
PHP Version: Irrelevant OS: FreeBSD/amd64 6.1
Private report: No CVE-ID: None
 [2006-04-19 10:40 UTC] ler at lerctr dot org
Description:
------------
trying a simple script:

 $ cat test.php
<?php
  $a = "Hello";
  $b = "Goodbye";
  echo xdiff_string_diff($a, $b, 1);
?>

$


(gdb) bt
#0  0x00000000004ef94f in _efree ()
#1  0x00000008073d44c5 in xdiff_free (ptr=0x8073d4490)
    at /home/ler/xdiff-pecl/xdiff-1.4/xdiff.c:97
#2  0x00000008073dc878 in xdl_malloc ()
   from /usr/local/lib/php/20050922/xdiff.so
#3  0x00000008073da7f9 in xdl_mmfile_writeallocate ()
   from /usr/local/lib/php/20050922/xdiff.so
#4  0x00000008073d58a5 in load_into_mm_file (buffer=0x9cef98 "Hello", size=5,
    dest=0x7fffffffce90) at /home/ler/xdiff-pecl/xdiff-1.4/xdiff.c:629
#5  0x00000008073d5c24 in make_diff_str (str1=0x9cef98 "Hello", size1=5,
    str2=0x9cefb8 "Goodbye", size2=7, output=0x7fffffffcf40, context=1,
    minimal=0) at /home/ler/xdiff-pecl/xdiff-1.4/xdiff.c:721
#6  0x00000008073d46de in zif_xdiff_string_diff (ht=3, return_value=0x9f9398,
    return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
    at /home/ler/xdiff-pecl/xdiff-1.4/xdiff.c:203
#7  0x0000000000526358 in zend_do_fcall_common_helper_SPEC ()
#8  0x0000000000525ca1 in execute ()
#9  0x0000000000509657 in zend_execute_scripts ()
#10 0x00000000004cae0f in php_execute_script ()
#11 0x000000000057fbec in main ()
(gdb)

this is with PHP 5.1.2 (it also dies on a FreeBSD i386 installation, which is I believe FreeBSD 4 

I can give shell access to this box. 

I installed libxdiff 0.10 from ports with -fPIC included in it's compile. 



Reproduce code:
---------------
 $ cat test.php
<?php
  $a = "Hello";
  $b = "Goodbye";
  echo xdiff_string_diff($a, $b, 1);
?>

$


Expected result:
----------------
it to work.

Actual result:
--------------
SIGBUS and a coredump

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-19 12:05 UTC] ler at lerctr dot org
It appears that the configure test for HAVE_XDL_SET_ALLOCATOR_PRIV is failing. 

if I manually define this to 1 after the config, it appears to work.
 [2006-04-19 12:44 UTC] ler at lerctr dot org
if the xdiff.h header is in /usr/local (as it is when FreeBSD Ports install it), the compile test fails, since the -I says /usr/local, and not /usr/local/include.
 [2008-07-01 12:25 UTC] mg at iceni dot pl
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/xdiff


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC