php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39380 php crashes in preg_match
Submitted: 2006-11-04 17:14 UTC Modified: 2006-12-01 21:29 UTC
From: corinl at gmx dot de Assigned: andrei (profile)
Status: Not a bug Package: PCRE related
PHP Version: 5.2.0 OS: linux debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: corinl at gmx dot de
New email:
PHP Version: OS:

 

 [2006-11-04 17:14 UTC] corinl at gmx dot de
Description:
------------
running the reproduce code crashes php 5.1.6 and 5.2.0 with a segmentation fault.

--
(gdb) set args php_crash.php
(gdb) run
Starting program: /usr/bin/php php_crash.php
[Thread debugging using libthread_db enabled]
[New Thread -1486911808 (LWP 25359)]
ok1
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1486911808 (LWP 25359)]
0x080b167d in match (
    eptr=0xa73d1542 "t; schwierig<br />\r\n&gt;&lt; seltsam &gt;&lt; sensibel &gt;&lt; spontan &gt;&lt; stur &gt;&lt; t&auml;towiert &gt;&lt; treu &gt;&lt; unberechenbar <br />\r\n\r\n&gt;&lt; unentschlossen &gt;&lt;ungeduldig&"...,
    ecode=0x880b9a8 ";", offset_top=2, md=0xaf9e2620, ims=4, eptrb=0xaf1e8558,
    flags=2, rdepth=6454)
    at /usr/local/src/php-5.2.0/ext/pcre/pcrelib/pcre_exec.c:554
554     utf8 = md->utf8;       /* Local copy of the flag */
(gdb)


Reproduce code:
---------------
http://www.netskin.de/download/php_crash.php.txt

Expected result:
----------------
ok1
ok2


Actual result:
--------------
ok1
-> crashes before echo('ok2')

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-01 21:29 UTC] nlopess@php.net
another stack overflow problem. you can use the new ini settings to prevent the segfault and/or increase the stack size.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 17:01:33 2025 UTC