Skip to content

magento/magento2#32599: Fix segfault when base URL config is empty - #41082

Open
swnsma wants to merge 1 commit into
magento:2.4-developfrom
swnsma:magento/magento2#32599
Open

magento/magento2#32599: Fix segfault when base URL config is empty#41082
swnsma wants to merge 1 commit into
magento:2.4-developfrom
swnsma:magento/magento2#32599

Conversation

@swnsma

@swnsma swnsma commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description (*)

Fixes infinite recursion (SIGSEGV / stack overflow) in store config placeholder processing when web/secure/base_url or web/unsecure/base_url is NULL or empty.

Magento\Store\Model\Config\Placeholder previously kept recursing on unresolved {{secure_base_url}} / {{unsecure_base_url}} placeholders. It now throws a clear, localizable LocalizedException instead.

Fixes #32599

Fixed Issues (if relevant)

  1. Fixes NULL value for web/secure/base_url generates a SEGSERV error #32599 — NULL value for web/secure/base_url generates a SEGSERV error

Manual testing scenarios (*)

  1. Set web/secure/base_url in core_config_data to NULL (ensure no higher-priority env override).
  2. Flush caches.
  3. Load storefront or run bin/magento.
  4. Before: PHP-FPM child dies with SIGSEGV / max stack size error.
  5. After: A clear exception: Cannot resolve "{{secure_base_url}}" because "web/secure/base_url" is empty.

Questions or comments

Unit and integration tests cover null/empty/missing base URL for both secure and unsecure placeholders, plus the scope-level Processor\Placeholder path.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md related to the contributed code is updated, included or not required
  • All automated tests passed successfully (all builds are green) — pending CI

@m2-assistant

m2-assistant Bot commented Aug 4, 2026

Copy link
Copy Markdown

Hi @swnsma. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

Stop infinite recursion in config placeholder processing when
web/secure/base_url or web/unsecure/base_url is null or empty.
Throw a clear LocalizedException instead of exhausting the stack.
@swnsma
swnsma force-pushed the magento/magento2#32599 branch from 8af2a1d to 4caa0e6 Compare August 4, 2026 05:46
@swnsma

swnsma commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@engcom-Hotel engcom-Hotel added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Aug 4, 2026
@github-project-automation github-project-automation Bot moved this to Pending Review in Pull Requests Dashboard Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

NULL value for web/secure/base_url generates a SEGSERV error

2 participants