ggc_collect() discarding/reusing remap_debug_filename() output, thus producing invalid objects

Florian Weimer fw@deneb.enyo.de
Tue Mar 19 16:29:00 GMT 2019


* Thomas Otto:

> I tried to annotate `cached_wd` via GTY((..)) as on first glance it seems 
> the gc mistakenly re-uses it, but the `gengtype` generated state file never 
> picks this variable up.

Have you tried moving the variable to the top level and annotating it
with GTY ((cache))?

I believe gengtype will emit code to clear such variables during
garbage collection, avoiding the issue.



More information about the Gcc-help mailing list