https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124480

            Bug ID: 124480
           Summary: [16 regression] g++.dg/modules/pr99023_b.X FAILs
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-pc-solaris2.11

Between 20250708 (b7b8eb90abaeaaf4a51325e087cd43a4dac8d25a) and 20250709
(2e6dc9e19cdac43354608a1fc29fe31ec614775c),
the g++.dg/modules/pr99023_b.X test began to FAIL with a 32-bit Solaris/x86
compiler with -m64:

cc1plus: out of memory allocating 916972 bytes after a total of 9445376 bytes

A reghunt identified

commit 7135990e3b07d3f29de46e9ca7ddbb66c094d52e
Author: Mateusz Zych <[email protected]>
Date:   Tue Jul 8 10:51:07 2025 +0100

    libstdc++: Added missing members to numeric_limits specializations for
integer-class types

as the culprit.

I've run the failing cc1plus invocation under truss to determine the mmap{,64}
size distribution and counts for both cases:

* Before:

      1  4
      2  4096
      8  8192
      5  16384
      1  24576
      9  32768
      1  36304
      4  65536
      2  131072
      1  196608
      2  262144
      3  524288
      2  1048576
      1  1662976
    932  2097152
      2  3313664
      1  4194304

* After:

    746  4096
     12  8192
      4  16384
      1  24576
      7  32768
      1  36304
      3  65536
      1  131072
      1  196608
      1  262144
      2  524288
      2  1048576
   1699  2097152
      1  4194304

So the number of 2 MB allocations has almost doubled, causing the 32-bit
address space to be exhausted.

Reply via email to