Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #1

Open
Nix-id opened this issue Apr 26, 2017 · 0 comments
Open

Segmentation fault #1

Nix-id opened this issue Apr 26, 2017 · 0 comments

Comments

@Nix-id
Copy link

Nix-id commented Apr 26, 2017

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!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant