Bug 89108 - variable tracking size limit exceeded
Summary: variable tracking size limit exceeded
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 8.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog, memory-hog
Depends on:
Blocks:
 
Reported: 2019-01-29 18:46 UTC by Jonny Grant
Modified: 2022-12-31 21:38 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 7.4.0, 8.2.1, 9.0
Last reconfirmed: 2019-01-30 00:00:00


Attachments
var tracking test case (476 bytes, text/x-csrc)
2019-01-29 18:46 UTC, Jonny Grant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonny Grant 2019-01-29 18:46:02 UTC
Created attachment 45561 [details]
var tracking test case

I'm seeing this on 350 line file, will attach.

Could the "note: variable tracking size limit exceeded with -fvar-tracking-assignments" message be expanded?

How about including the size limit, and how much would be actually required?

"note: variable tracking size limit 1,000,000 bytes exceeded by 512,000 bytes"


I saw there was this option, but not clear what to set it to, it's not ideal for me to need to set it.
--param=max-vartrack-size=


$ g++-8 -g -O2 -D_GLIBCXX_ASSERTIONS -fsanitize=undefined,address -fno-omit-frame-pointer -c var_tracking.cpp
var_tracking.cpp: In function ‘bool f(const string&, std::__cxx11::string&)’:
var_tracking.cpp:20:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 bool f(const std::string & name, string & ref)
      ^
Comment 1 Jonny Grant 2019-01-29 19:13:15 UTC
Could gcc even support a dynamic size? to avoid a hard coded limit?
Comment 2 Richard Biener 2019-01-30 08:51:40 UTC
The hard limit is there to make compiling possible in some cases.  Btw,
santizing makes your "small" testcase quite large.
It's also of the usual repeat-many-similiar-things-in-one-functions cases
where var-tracking runs into quadraticnesses.

Confirmed with -O2 -g -fsanitize={undefined,address} (only need either, not both)