Skip to content

Restrict the compiler self-build RSS tripwire to compiler self-builds; ordinary application builds must not inherit it #1665

Closed

Description

@ehartford

The 1 GiB per-target RSS regression guard from #679 is being applied to ordinary downstream applications. That guard is intended for the compiler compiling the compiler, not for users compiling their applications.

Observed failure

Building WIPE, a separate With + raylib application, with with v0.15.2.1 on macOS/arm64:

$ with build
[time] wipe 67.6s
[times] total 67.6s across 1 executed; slowest: wipe 67.6s; peak rss 1267M (wipe)
error: rss tripwire: target 'wipe' peaked at 1266M (limit 1024M, #679)
[build] :wipe wall 68.6s

The build returned failure because of the RSS check, rather than a language error or operating-system allocation failure. The application had bounded storage expressed as repeated fixed-array initializers: 512 enemies, 96 bullets, 2,048 particles, and 64 pulses. Replacing these with preallocated vectors avoided the guard, but applications should not need to change a valid storage design to satisfy an internal compiler self-build budget. This is an observed application failure, not yet a minimized standalone reproducer.

Source

In the inspected checkout at 1814a141d5c068237b7ac88694e497cbbd814f30, src/main.w around lines 2576–2593 runs the tripwire under times_top_level:

if timed_rss[tri] > 1073741824:
    // Emit error and return nonzero.

There is no compiler-self-build scope check or configurable threshold in this block. docs/perf/README.md describes changing the limit through a source edit.

Expected behavior

  • Preserve the memory-regression guard for the compiler's own self-build/verification workflow.
  • Do not impose that internal 1 GiB budget on ordinary with build application targets.
  • Keep RSS measurement/reporting available without making it an implicit application build failure.
  • If application memory budgets are supported, make them explicit, opt-in, and configurable. Raising the global hard-coded threshold is not the scope fix.

Acceptance criteria

  1. A successful downstream application compilation exceeding 1 GiB RSS returns success unless that project explicitly requested a memory budget.
  2. Compiler self-build verification still fails when its configured regression budget is exceeded.
  3. Regression coverage verifies both scopes without requiring every test run to allocate more than 1 GiB (exercise the policy with recorded/synthetic measurements).
  4. Document the distinction between compiler self-build enforcement and ordinary application RSS reporting.

Related: #679.

Activity

  1. added a commit that references this issue on Sep 25, 2026
    2741bf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions