Skip to content

Fix VM include paths after #707 script magic#713

Merged
PurHur merged 1 commit into
masterfrom
fix-707-include-literal-path
May 22, 2026
Merged

Fix VM include paths after #707 script magic#713
PurHur merged 1 commit into
masterfrom
fix-707-include-literal-path

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 22, 2026

Summary

Follow-up to merged #709 (#707): MiniWebApp VM failed because TYPE_INCLUDE evaluated include paths at runtime (sometimes producing null-byte garbage) instead of using compile-time literalIncludePaths / deploy specs.

  • Resolve include file from literalIncludePaths / deployIncludePaths when present.
  • Reject null-byte paths in ScriptStack::normalize().
  • Detect php-cfg-magic-script-const.patch by Parser content, not only file existence.

Test plan

  • MiniWebAppVmCliTest (4 tests)
  • IncludeLiteralTest VM tests

Made with Cursor

Use compile-time literalIncludePaths/deploy paths in TYPE_INCLUDE instead
of evaluating a broken runtime path, and harden ScriptStack::normalize()
against null bytes. Tighten apply-patches detection for magic-script-const.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit a2a1e33 into master May 22, 2026
@PurHur PurHur deleted the fix-707-include-literal-path branch May 22, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant