Bug 1787575
| Summary: | g++ 4.8.5 runs out of memory whereas same works with old g++ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | iyerr | ||||
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Alexandra Petlanová Hájková <ahajkova> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.5 | CC: | fweimer, jakub, law, ohudlick, sipoyare, thrinath.kondala | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-01-13 19:25:53 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
iyerr
2020-01-03 13:21:11 UTC
Upstream PR93199 now has a short testcase that reproduces this behavior, plus bisection details on when GCC behavior changed. Hi Team ,may I know the current status of the bug.. The upstream PR tracks the current status, once it is done (not the case yet), we can start considering backports, but it will take a while, this isn't something that would have updates issued immediately like important security bugs. The https://gcc.gnu.org/r246314 might be backportable provided sufficient testing, the other changes from the PR look too risky, but we could instead apply something that is being considered for 9/8 backports, which is punt in sink_clobbers for -O0 (maybe -O1 too) if we would move say more than 4096 clobbers, which would break the quadratic behavior. I don't know what the generator that generates this kind of code is, but if I could suggest something, one wouldn't run into this behavior if the code used if (...) { ... } else { ... } rather than ?:, because the latter in C++ has the serious disadvantage that all temporaries need to stay around until the whole toplevel statement finishes, which causes those 80000 temporary destruction until the end of the whole statement, rather than destructing each temporary shortly after construction. Oh, and forgot to say, easy workaround until this is fixed would be to add -fstack-reuse=named_vars (or -fstack-reuse=none) option for the problematic sources. Not fixable in RHEL 7. There are proposed workarounds that can mitigate this problem. Closing out. |