26

In a release build I'm getting the following informational warning from GCC 4.4.7.

note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

Have I exceeded the variable name length supported by variable tracking assignment?
If so, is there a way to adjust the supported size?

paxos1977
  • 144,851
  • 26
  • 89
  • 126
  • This appears to happen with Clang; but Clang does not produce the helpful message. And it seems to happen more often under GCC and Clang when using the Undefined Behavior Sanitizer. – jww May 27 '17 at 12:25

2 Answers2

28

This is just a note from the compiler that the debug info for the particular function will have lower quality, because your code of function is too large/complex so variable tracking reached limit of hash table slots.

The max is likely lot of millions and it can be raised with something (like --param=max-vartrack-size=60000000) but you could end up with very slow compilation or the compiler could take very lot of memory to compute the debug info location lists.

So unless you have trouble debugging the code just ignore that warning.

Öö Tiib
  • 10,226
  • 24
  • 40
  • 2
    Yeah, the only downside is the file gets compiled twice. FYI, getting this error on a large unit test .cpp. – paxos1977 May 06 '14 at 19:34
  • *"So unless you have trouble debugging the code just ignore that warning..."* - How about CI timeouts which cause the build to fail? Since I know one file is a problem, should I just use `-fno-var-tracking-assignments`? – jww May 27 '17 at 11:59
  • @jww CI timeouts guard if something that CI service runs did hang. When build just takes long time then we can adjust the timeout. – Öö Tiib Jul 01 '17 at 15:05
0

My warning reads: with -fvar-tracking-assignments, retrying without

if you care about it linking twice, you could set -fno-var-tracking-assignments in the makefile instructions to avoid that retry.

Abhishek Dutt
  • 988
  • 5
  • 11
  • 21
MangoCat
  • 49
  • 5