Incremental compilation OOM · Issue #139142 · rust-lang/rust (original) (raw)

This comes from the bug report DioxusLabs/dioxus#3903 with DioxusLabs/dioxus#3903 (comment) being especially relevant.

I have no idea how to diagnose this, and there is no real crash - just an OOM that requires the linux OOM killer step in. It feels like the borrow checker freaking out? Probably an incorrect guess
This does not appear to be related to macro expansion, which is what the original report's title says - this seems to occur well after expansion. While the sample code does still contain a macro, expanding beyond this still reproduces the issue.

This occurs both on stable (1.85.1) and latest nightly (920d95eaf 2025-03-28) as of my most recent test.

I'm happy to rewrite this bug report, I just have no idea where to start in actually trying to diagnose this (I lack knowledge on tooling etc for bugs like this) - it eats about 1GB/s if you let it, and ate all 96GB of RAM I have installed, but I'm not sure how to instrument it.
The linked issue has a sample project that reproduces this, with reproduction instructions in the initial bug report.