Closed yoeunes closed 5 years ago
I tested with parentheses as well, but it didn't work either, thing is, on MacOS, any statement with preg_match within a forked child process results in segmentation fault, no matter what you put inside.
So, if I understand you correctly, that basically just confirms that this is an issue which needs to be solved in PHP Core (or possibly MacOS), not in PHP userland code.
A search of the PHP bug tracker yielded this issue which I believe is the closest match: https://bugs.php.net/bug.php?id=77260
@gagan0123 It might help get the issue resolved if you (or someone else who can reproduce the issue) would add details of the findings from this ticket to that thread.
Currently child processes in PHPCS are failing at https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Util/Common.php#L143
Just a note that during my debugging yesterday, my child processes were not directly failing here. I was able to echo content after the preg_match had completed and have that successfully output to screen for the child process. I could also exit after the preg_match and have the child process exit normally. But by the time the function had returned its value back to the caller, the process was dead.
I've been unable to replicate the issue in a test script, otherwise I'd report it.
Description
I get this exception when i run phpcs using a parallel value greater than 1
this is my phpcs.xml file: