[Bug preprocessor/16366] Preprocessor option -remap causes memory corruption
pavenis at latnet dot lv
gcc-bugzilla@gcc.gnu.org
Mon Jul 5 05:54:00 GMT 2004
------- Additional Comments From pavenis at latnet dot lv 2004-07-05 05:54 -------
Created an attachment (id=6688)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6688&action=view)
Patch to fix the bug
The reason was that in case if option -remap was specified pfile->file_hash
was updated before attempt to use pointer hash_slot. If the array additionally
gets reallocated then the result is accessing already freed memory. Calling
htab_find_slot_with_hash once more later fixes the problem (verified for
i586-pc-msdosdjgpp)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16366
More information about the Gcc-bugs
mailing list