This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix for [Bug preprocessor/16366] Preprocessor option -remapcauses memory corruption


Andris Pavenis <pavenis@latnet.lv> writes:

>    found:
> +   /* pfile->file_hash may have been modified if -remap is specified  */
> +   if (CPP_OPTION (pfile, remap))
> +     hash_slot = (struct file_hash_entry **)
> +        htab_find_slot_with_hash (pfile->file_hash, fname,
> +   			         htab_hash_string (fname),
> + 			         INSERT);

So neither I nor - as far as I know - *anyone* really understands this
data structure, but I'm pretty sure this is wrong.  You're causing it
to store the cached entry under the remapped name, where it will never
be found on lookup.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]