public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/97240] New: Analyzer runs out of memory building C++ source
@ 2020-09-29 11:11 andris.pavenis at iki dot fi
  2022-02-15 18:31 ` [Bug analyzer/97240] " andris at gcc dot gnu.org
  2022-02-16  9:49 ` andris at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: andris.pavenis at iki dot fi @ 2020-09-29 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97240
           Summary: Analyzer runs out of memory building C++ source
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: andris.pavenis at iki dot fi
  Target Milestone: ---

Created attachment 49285
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49285&action=edit
Preprocessed source

Compiling source with -fanalyzer incommand line causes gcc-10.2.0 run out of
memory.

g++ -c -v -std=c++17 -fanalyzer FastMathTest.ii 
Using built-in specs.
COLLECT_GCC=g++
Kohde: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl
--with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit
--enable-cet=auto --enable-checking=release --enable-clocale=gnu
--enable-default-pie --enable-default-ssp --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id
--enable-lto --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-libunwind-exceptions --disable-werror
gdc_include_dir=/usr/include/dlang/gdc
Säiemalli: posix
Supported LTO compression algorithms: zlib zstd
gcc-versio 10.2.0 (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-std=c++17' '-fanalyzer' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/cc1plus -fpreprocessed FastMathTest.ii
-quiet -dumpbase FastMathTest.ii -mtune=generic -march=x86-64 -auxbase
FastMathTest -std=c++17 -version -fanalyzer -o /tmp/ccZO5KJm.s
GNU C++17 (GCC) versio 10.2.0 (x86_64-pc-linux-gnu)
        käännetty GNU C:n versiolla 10.2.0, GMP version 6.2.0, MPFR version
4.1.0, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (GCC) versio 10.2.0 (x86_64-pc-linux-gnu)
        käännetty GNU C:n versiolla 10.2.0, GMP version 6.2.0, MPFR version
4.1.0, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2affcd71b0797e2421aae734ab600c81


Killed compile when memory use exceeded 70 GB.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug analyzer/97240] Analyzer runs out of memory building C++ source
  2020-09-29 11:11 [Bug analyzer/97240] New: Analyzer runs out of memory building C++ source andris.pavenis at iki dot fi
@ 2022-02-15 18:31 ` andris at gcc dot gnu.org
  2022-02-16  9:49 ` andris at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: andris at gcc dot gnu.org @ 2022-02-15 18:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andris Pavenis <andris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.3.0
      Known to work|                            |11.1.0
                 CC|                            |andris at gcc dot gnu.org

--- Comment #1 from Andris Pavenis <andris at gcc dot gnu.org> ---
Reproduced on Arch Linux with gcc-10.3.0 (killed process when memory use
reached about 30 GB)

Problem does not happen with gcc-11.0 (Also Arch Linux). Output of
/usr/bin/time -v g++ -c -std=c++17 -fanalyzer FastMathTest.ii (analyzer
messages skipped):

        Command being timed: "g++ -c -std=c++17 -fanalyzer FastMathTest.ii"
        User time (seconds): 53.95
        System time (seconds): 1.48
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:55.51
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 6627336
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 1714051
        Voluntary context switches: 7
        Involuntary context switches: 718
        Swaps: 0
        File system inputs: 0
        File system outputs: 10264
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug analyzer/97240] Analyzer runs out of memory building C++ source
  2020-09-29 11:11 [Bug analyzer/97240] New: Analyzer runs out of memory building C++ source andris.pavenis at iki dot fi
  2022-02-15 18:31 ` [Bug analyzer/97240] " andris at gcc dot gnu.org
@ 2022-02-16  9:49 ` andris at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: andris at gcc dot gnu.org @ 2022-02-16  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andris Pavenis <andris at gcc dot gnu.org> ---
Tried with gcc-12.0.1-20220216 (revision
875e493bf5eb04c11bc3846a6bfee47a6f183e3f).

gcc configured without additional configure parameters (Configured with:
../gcc-12.0.1-20220216/configure)

1) /opt/gcc-git/bin/g++ -c -std=c++17 -fanalyzer -O2 FastMathTest.ii

About same memory use but took more than 10 minutes to finish

2) /opt/gcc-git/bin/g++ -c -std=c++17 -fanalyzer FastMathTest.ii

Memory use about 30 GB, did not have enough patience to wait for it to finish

gcc configured as ../gcc-12.0.1-20220216/configure --prefix=/opt/gcc-git
--enable-checking=release

Only tried /opt/gcc-git/bin/g++ -c -std=c++17 -fanalyzer FastMathTest.ii.
Memory use 30.8GB after 1 hour runtime (AMD Ryzen 9 3950X). Not ended yet

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-16  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 11:11 [Bug analyzer/97240] New: Analyzer runs out of memory building C++ source andris.pavenis at iki dot fi
2022-02-15 18:31 ` [Bug analyzer/97240] " andris at gcc dot gnu.org
2022-02-16  9:49 ` andris at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).