Skip to content

HTTP/SSE auth hardening + MSVC heap exhaustion fix#10

Closed
0xeb wants to merge 10 commits intomainfrom
hardening/server-auth
Closed

HTTP/SSE auth hardening + MSVC heap exhaustion fix#10
0xeb wants to merge 10 commits intomainfrom
hardening/server-auth

Conversation

@0xeb
Copy link
Copy Markdown
Owner

@0xeb 0xeb commented Nov 28, 2025

Summary

  • Add HTTP/SSE authentication hardening and tests
  • Split interactions.cpp (5547 lines) into 6 parts (~750-825 lines each) to fix MSVC heap exhaustion (C1060)
  • Extract 42 helper functions into interactions_helpers.hpp
  • All 164 interaction tests preserved across 6 parts

Test plan

  • All 44 tests pass locally on Windows
  • CI: Linux builds pass
  • CI: Windows builds pass (no heap exhaustion)
  • CI: macOS builds pass
  • CI: Format check passes

0xeb added 10 commits November 27, 2025 14:33
- Change from 3-way split (~1900 lines) to 6-way split (~750-825 lines)
- Extract all helper functions into interactions_helpers.hpp
- Remove monolithic interactions.cpp in favor of split parts
- Each part contains ~27-28 tests
- All 164 tests pass on Windows with smaller compilation units
- interactions_helpers.hpp now contains only forward declarations (92 lines)
- interactions_helpers.cpp contains implementations (1825 lines)
- Helpers compiled as static library, test parts link against it
- This prevents MSVC from processing all helpers for each test file
Even the single helpers.cpp was causing heap exhaustion.
Split into 5 parts to keep each file small enough for MSVC.
The 64-bit host compiler has more addressable memory than the 32-bit
host, which helps avoid C1060 (out of heap space) errors when compiling
template-heavy code like JSON object construction.
SSE tests can be flaky on CI when running in parallel due to
port binding conflicts. Running them serially improves reliability.
@0xeb 0xeb closed this Nov 28, 2025
@0xeb 0xeb deleted the hardening/server-auth branch November 28, 2025 17:00
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