php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51024 segmentation fault when concatenating very large strings on Redhat x86
Submitted: 2010-02-12 01:20 UTC Modified: 2010-02-12 16:23 UTC
From: mikerudra at yahoo dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2SVN-2010-02-12 (snap) OS: Redhat EL
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: mikerudra at yahoo dot com
New email:
PHP Version: OS:

 

 [2010-02-12 01:20 UTC] mikerudra at yahoo dot com
Description:
------------
Hi guys, 
I checked this bug report
http://bugs.php.net/bug.php?id=50207
and I updated to a release version from today.
The bug is still there as you can see here

http://nats.hotladies.com/nfo.php


Please tell me what is to be done, I need to install NATS and they do not accept 5.3, I need the 5.2 version, please help.
Thanks

Reproduce code:
---------------
$s = str_repeat('A', pow(2,31));
$s .= 'B'; // fails with segfault
printf("strlen: %u last-char: %c", strlen($s), $s[pow(2,31)]);



Expected result:
----------------
Donno, should just work?! Is used by NATS and I got an error working with ioncube encoded source code...

Actual result:
--------------
Notice: Uninitialized string offset: -2147483648 in /var/www/vhosts/nats.hotladies.com/nats/www/nfo.php on line 7
strlen: 1 last-char: � 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-12 16:23 UTC] jani@php.net
You're also getting a warning:

PHP Warning:  str_repeat(): Second argument has to be greater than or equal to 0

This is not crashing, segfaulting or anything like that.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 05 13:00:02 2025 UTC