Issue 1:
This might be related to #14722.

I'm using php-vcr which records HTTP requests and responses for playback during tests. By default it stores the requests in YAML and parses it using the symfony parser. It fails when parsing large JSON resposes. The one I'm currently dealing with is +150KB.

This is what the last 100 lines of a stacktrace look like. I could share more if you'd like. I figure this is enough to show that it appears to be blowing the stack while using regex to parse. You have to scroll to the right to see the file names and line number.

16.3362 17926104 -> in_array() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:210
16.3363 17925976 -> Symfony\Component\Yaml\Inline::parseQuotedScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:212
16.3363 17926200 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257
16.3363 17926280 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257
16.3364 17926792 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:261
16.3364 17926840 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:261
16.3365 17926872 -> Symfony\Component\Yaml\Unescaper->unescapeSingleQuotedString() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:267
16.3365 17927016 -> str_replace() /home/ubuntu/workspace/vendor/symfony/yaml/Unescaper.php:45
16.3366 17926920 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:270
16.3366 17925568 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:75
16.3366 17925616 -> preg_replace() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:75
16.3367 17925112 -> Symfony\Component\Yaml\Parser->moveToNextLine() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:71
16.3367 17925160 -> count() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:415
16.3368 17925112 -> Symfony\Component\Yaml\Parser->isCurrentLineEmpty() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:72
16.3368 17925112 -> Symfony\Component\Yaml\Parser->isCurrentLineBlank() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:592
16.3369 17925208 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:602
16.3369 17925112 -> Symfony\Component\Yaml\Parser->isCurrentLineComment() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:592
16.3369 17925208 -> ltrim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:613
16.3370 17925208 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:82
16.3370 17923840 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:118
16.3371 17925192 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:118
16.3371 17925280 -> Symfony\Component\Yaml\Inline::parse() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:125
16.3372 17925328 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:49
16.3372 17925408 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:51
16.3372 17925096 -> Symfony\Component\Yaml\Inline::parseScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:127
16.3373 17926056 -> in_array() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:210
16.3373 17925976 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:223
16.3374 17926064 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:224
16.3374 17926112 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:227
16.3374 17926064 -> Symfony\Component\Yaml\Inline::evaluateScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:238
16.3375 17926112 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:434
16.3375 17926200 -> strtolower() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:435
16.3376 17926336 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:437
16.3376 17926368 -> is_numeric() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:466
16.3377 17925184 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:195
16.3377 17925184 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3377 17925184 -> ltrim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3378 17925264 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3378 17925088 -> Symfony\Component\Yaml\Parser->parseValue() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:223
16.3379 17925184 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:446
16.3379 17925344 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:460
16.3379 17925360 -> Symfony\Component\Yaml\Inline::parse() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:467
16.3380 17925408 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:49
16.3380 17925488 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:51
16.3381 17925536 -> function_exists() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:55
16.3381 17925536 -> ini_get() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:55
16.3381 17926152 -> Symfony\Component\Yaml\Inline::parseScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:71
16.3382 17926280 -> in_array() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:210
16.3382 17926152 -> Symfony\Component\Yaml\Inline::parseQuotedScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:212
16.3383 17926376 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257
16.3383 17926456 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257
16.3384 17926968 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:261
16.3384 17927016 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:261
16.3385 17927048 -> Symfony\Component\Yaml\Unescaper->unescapeSingleQuotedString() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:267
16.3385 17927192 -> str_replace() /home/ubuntu/workspace/vendor/symfony/yaml/Unescaper.php:45
16.3386 17927096 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:270
16.3386 17925744 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:75
16.3386 17925792 -> preg_replace() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:75
16.3387 17925280 -> Symfony\Component\Yaml\Parser->moveToNextLine() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:71
16.3387 17925328 -> count() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:415
16.3388 17922304 -> Symfony\Component\Yaml\Parser->moveToNextLine() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:71
16.3388 17922352 -> count() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:415
16.3389 17922304 -> Symfony\Component\Yaml\Parser->isCurrentLineEmpty() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:72
16.3389 17922304 -> Symfony\Component\Yaml\Parser->isCurrentLineBlank() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:592
16.3390 17922400 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:602
16.3390 17922304 -> Symfony\Component\Yaml\Parser->isCurrentLineComment() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:592
16.3391 17922400 -> ltrim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:613
16.3391 17922400 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:82
16.3393 17921936 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:118
16.3544 18516856 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:118
16.3546 18516944 -> Symfony\Component\Yaml\Inline::parse() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:125
16.3546 18516992 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:49
16.3546 18517072 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:51
16.3547 18516760 -> Symfony\Component\Yaml\Inline::parseScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:127
16.3547 18517720 -> in_array() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:210
16.3547 18517640 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:223
16.3547 18517720 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:224
16.3548 18517768 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:227
16.3548 18517720 -> Symfony\Component\Yaml\Inline::evaluateScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:238
16.3548 18517768 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:434
16.3548 18517848 -> strtolower() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:435
16.3549 18517976 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:437
16.3549 18518008 -> is_numeric() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:466
16.3549 18516904 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:195
16.3551 18516992 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3552 18516992 -> ltrim() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3552 18665472 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:202
16.3553 18516896 -> Symfony\Component\Yaml\Parser->parseValue() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:223
16.3553 18516992 -> strpos() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:446
16.3553 18517152 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:460
16.3554 18517168 -> Symfony\Component\Yaml\Inline::parse() /home/ubuntu/workspace/vendor/symfony/yaml/Parser.php:467
16.3554 18517216 -> trim() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:49
16.3554 18665696 -> strlen() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:51
16.3555 18665744 -> function_exists() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:55
16.3555 18665744 -> ini_get() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:55
16.3555 18666360 -> Symfony\Component\Yaml\Inline::parseScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:71
16.3556 18666488 -> in_array() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:210
16.3556 18666360 -> Symfony\Component\Yaml\Inline::parseQuotedScalar() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:212
16.3556 18666584 -> substr() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257
16.3557 18815064 -> preg_match() /home/ubuntu/workspace/vendor/symfony/yaml/Inline.php:257

Issue 2:
The following regexp uses a lot of recursion every time the content has a lot of double quotes:

(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"

Basically it is causing a crash in windows due to stack overflow on large inputs (~20k of escaped html in the field).