> > And I still think this function and the static variable which never changes
> > once set does not require any GC. Just setting the cached_wd variable to
> > the unchanged pointer from get_src_pwd() or allocating one in the function
> > itself is enough. This solves the problem and relieves th
> > > > > > "ggc_collect() discarding/reusing remap_debug_filename() output,
> > > > > > thus producing invalid objects"
> > > > >
> > > > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd ()
> > > > > result survives. I vaguely remember GC being happy with heap
> > > > > strings (d
> > > > "ggc_collect() discarding/reusing remap_debug_filename() output,
> > > > thus producing invalid objects"
> > >
> > > Hmm, but AFAICS it can end up on the heap if plain get_src_pwd ()
> > > result survives. I vaguely remember GC being happy with heap
> > > strings (due to identifiers?), but
> > "ggc_collect() discarding/reusing remap_debug_filename() output, thus
> > producing invalid objects"
>
> Hmm, but AFAICS it can end up on the heap if plain get_src_pwd () result
> survives. I vaguely remember GC being happy with heap strings (due to
> identifiers?), but not sure. Otherwise t
See the corresponding thread on gcc-help:
"ggc_collect() discarding/reusing remap_debug_filename() output, thus producing
invalid objects"
Regards
Thomas
make-ggc-pick-up-comp_dir_string-cache-value.patch
Description: make-ggc-pick-up-comp_dir_string-cache-value.patch