This is the mail archive of the gcc-bugs@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]

[Bug preprocessor/16366] Preprocessor option -remap causes memory corruption


------- 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


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