The regular expression in drupal_parse_info_format() seems to be crashing with a segfault when the value of an .info file key/value pair is too long.
In PHP 5.5.9, with Apache 2.2.25 and mod_fastcgi/2.4.6 (observed in a MAMP 3.0 installation on OSX 10.9.2 Intel i5)
The apache error log records: [notice] child pid xxx exit signal Segmentation Fault (11)
and no HTML response is transmitted.
The overall length of the .info file does not seem to matter, just the length of an individual value.
The maximum length I could get it to without crashing was 1531 characters.
I have only been able to test this on one instance of MAMP so far (although I have reinstalled MAMP)
I can confirm that the problem does not occur in PHP 5.4.24 on the same mac, nor does it occur on PHP 5.5.3 on Ubuntu. I haven't been able to get a working version of PHP 5.5.9 to test on another platform.
The attached file gives a simple test case. You might want to experiment with increasing or decreasing the length of the value (the lorem ipsum text) because I don't know if the character limit is unique to this installation.
The scenario which brought this to note: assigning a long robots.txt literal string into a variable within a profile.info file.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal_parse_info_format_test.php_.gz | 952 bytes | chris@bootcampmedia |
Comments
Comment #1
David_Rothstein commentedDoes the patch at #2349457: preg_match_all segmentation fault on drupal_parse_info_format help with this? It's about a slightly different problem, but I think the patch might solve this too. If so, we could close this issue as a duplicate.
Comment #2
David_Rothstein commented