[gs-bugs] [Bug 691380] Segfault in HEAD (2010-06-10)

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Jul 21 18:16:40 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691380

--- Comment #7 from Chris Liddell <chris.liddell at artifex.com> 2010-07-21 18:16:37 UTC ---
Created an attachment (id=6522)
 --> (http://bugs.ghostscript.com/attachment.cgi?id=6522)
path for iname.c


The reason the memory in question needs to be explicitly unmarked is because
gs_free_object() may not actually free it. If the memory is allocated from a
chunk in previous save level, gs_free_object() will not return it to the free
list (or to the OS). But the memory reference is explicitly removed from the
current save level, so clearing the gc marks may not happen as we'd expect,
thus *possibly* leaving spuriously already marked memory around to confuse the
next gc phase.

A small rearrangement of the code (see patch attachment) dispenses with the
valgrind warning, but keeps the "firewall" of unmarking the potentially freed
memory.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list