Open jrgdiaz opened 1 week ago
Hey @jrgdiaz, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.
may be php -d memory_limit=-1 ./src/vendor/bin/psalm
will help
-d memory_limit=-1
Hi !
I tried, but got the same error.
Run php -d memory_limit=-1 ./src/vendor/bin/psalm --taint-analysis --report=results.sarif --dump-taint-graph=taints.dot
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Target PHP version: [8](https://github.com/jrgdiaz/my-psalm-action/actions/runs/10670902017/job/29575781361#step:9:9).1 (inferred from current PHP version).
Scanning files...
Analyzing files...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 60 / 316 (18%)
░░░░░░░░░░░░░░░░░░░░░░░PHP Fatal error: Allowed memory size of 858[9](https://github.com/jrgdiaz/my-psalm-action/actions/runs/10670902017/job/29575781361#step:9:10)934592 bytes exhausted (tried to allocate 8388616 bytes) in /home/runner/work/my-psalm-action/my-psalm-action/src/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Methods.php on line 1161
Fatal error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 8388616 bytes) in /home/runner/work/my-psalm-action/my-psalm-action/src/vendor/vimeo/psalm/src/Psalm/Internal/Codebase/Methods.php on line [11](https://github.com/jrgdiaz/my-psalm-action/actions/runs/10670902017/job/29575781361#step:9:12)61
Error: Process completed with exit code 255.
Does that codebase runs correctly without taint analysis?
Nope, same error even with --taint-analysis removed
I also tried different versions of target codebase.
Could it be something in the code i'm scanning interfering with psalm?
This is the code i'm targeting:
Hello !
I have a psalm set up in github actions that gave me the following memory error, hoping someone can provide information as to why it may be happening?
The codebase i'm targeting is 62M, it has given me this error twice in the same 18% mark. but the weird thing to me is that i have targeted a 238M codebase and it takes a while but it's able to execute that successfully