Bug 1683776 - gcc uses too much memory on parsing large initialized array
Summary: gcc uses too much memory on parsing large initialized array
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gcc
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Marek Polacek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-27 18:53 UTC by Frank Ch. Eigler
Modified: 2023-07-18 14:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-12 14:26:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 12245 0 P4 NEW [8/9/10/11 regression] Uses lots of memory when compiling large initialized arrays 2021-01-12 14:13:44 UTC

Description Frank Ch. Eigler 2019-02-27 18:53:49 UTC
Relative to RHEL7, RHEL8's gcc 8.2.1 is subject to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245 .  It consumes approximately a hundred bytes of cc1 memory per initialized array literal.  This affects e.g. systemtap, which can generate some large initialized arrays.

% stap -kvp4 --example fileline-profile.stp --all-modules --ldd
(check last child gcc cpu & memory consumption w/ top)
% cd $TMPDIR/stapXYZ
% gcc -c stap_*.i
(observe same ram/cpu intensive compilation)

It's not hard for gcc to consume multiple gigabytes of ram, which is a problem on small VMs.

Comment 8 Marek Polacek 2021-01-12 14:26:20 UTC
Tracking this upstream in PR12245.  In each release we fix a few compile-time-hog bugs, hopefully this will/was one of them.


Note You need to log in before you can comment on or make changes to this bug.