Skip to content

Segmentation fault #1

Open
Open

Description

@Nix-id

i get segmentation fault error when try decode large json string

i found problem on line
$json = preg_replace_callback('!"((?:[^\\"]|\\\\|\\")*)"!', 'json_dqs', $json);

and affter google i fount this
https://bugs.php.net/bug.php?id=47376
comment "[2009-02-13 09:01 UTC] "

And, If you a interesting, I'm make more investigation on this theme:
On default OS limit:
$ ulimit -s
10240
example script behaves as:
//ini_set('pcre.recursion_limit', 9939);//Segmentation fault
//ini_set('pcre.recursion_limit', 9938);//Work

So, If I increase stack size on my system:
$ ulimit -s 65536
all work fine, as expected!!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions