Subject: make-dynamic-linker-cache OOMs for LLVM 15 on i686-linux

From: Marius Bakke <[email-masked]>
Date: Fri, 18 Nov 2022 19:41:18 +0100

Hello,

LLVM 15.0.4 fails on i686-linux:

  https://ci.guix.gnu.org/build/1702995/details

Because the 'make-dynamic-linker-cache' phase runs out of memory:

  starting phase `make-dynamic-linker-cache'
  GC Warning: Repeated allocation of very large block (appr. size 268439552):
	May lead to memory leak and poor performance
  GC Warning: Repeated allocation of very large block (appr. size 134221824):
	May lead to memory leak and poor performance
  GC Warning: Repeated allocation of very large block (appr. size 268439552):
  	May lead to memory leak and poor performance
  GC Warning: Failed to expand heap by 285216768 bytes
  GC Warning: Failed to expand heap by 268439552 bytes
  GC Warning: Out of Memory! Heap size: 3620 MiB. Returning NULL!
  Warning: Unwind-only out of memory exception; skipping pre-unwind handler.
  Warning: Unwind-only out of memory exception; skipping pre-unwind handler.
  Warning: Unwind-only out of memory exception; skipping pre-unwind handler.

(excerpt from https://ci.guix.gnu.org/build/1702995/log/raw)

Not sure why this phase uses so much memory.  Ideas?