Add reproducer

This commit is contained in:
Daniil Gentili 2023-12-13 21:56:42 +01:00
parent 3b66d7f8dd
commit a708246ae2
5 changed files with 34 additions and 11 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/vendor/
/bugs/classmap.php

View File

@ -6,8 +6,6 @@ Edit the branch in `Dockerfile:33`
## Tests
Tested on fa218eab4a9b5304afb871a4405546068cb65008
1. Composer: Fixed
2. Psalm: Fixed
3. MadelineProto: Fixed
@ -17,6 +15,7 @@ Tested on fa218eab4a9b5304afb871a4405546068cb65008
7. Psalm (master, unit): Fixed
8. Psalm (patched master, unit): Fixed
9. Composer: Fixed
10. Amphp: Always fails
11. Reactphp: Always fails
12. Amphp: Always fails
10. Amphp: Fixed
11. Reactphp: Fixed
12. Amphp: Fixed
13. Classmap: always fails

5
bugs/13_classmap.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash -e
php bugs/classmap_gen.php
docker run -v $PWD:/app -w /app --rm --privileged -it asan_tests php /app/bugs/classmap.php

17
bugs/classmap_gen.php Normal file
View File

@ -0,0 +1,17 @@
<?php
$f = '<?php
$vendorDir = dirname(__DIR__);
return array(
';
$v = 'a';
for ($x = 0; $x < 11_000; $x++) {
$v++;
$f .= "'$v' => \$vendorDir . '$v',\n";
}
$f .= ");\n";
file_put_contents(__DIR__.'/classmap.php', $f);

12
composer.lock generated
View File

@ -8,16 +8,16 @@
"packages": [
{
"name": "nikic/php-parser",
"version": "v4.17.1",
"version": "v4.18.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"shasum": ""
},
"require": {
@ -58,9 +58,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0"
},
"time": "2023-08-13T19:53:39+00:00"
"time": "2023-12-10T21:03:43+00:00"
}
],
"packages-dev": [],