[gs-bugs] [Bug 692246] font cache infinite loop

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu Jun 2 14:32:35 UTC 2011


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

--- Comment #3 from Henry Stiles <henry.stiles at artifex.com> 2011-06-02 14:32:34 UTC ---
(In reply to comment #2)
> The problem is down to gx_lookup_cached_char, the lookup table is 8192 in size
> and is completely full. Just by setting cmax_LARGE to 6000 will solve this
> problem.
> 
> However, there is another problem here in that if the table is ever full again
> it will just go round endlessly in the while loop. I thought having an escape
> clause might help forcing it to jump out and return a zero value but this leads
> to other complications which may need further investigation!

>From the original author:

Usually the way I ensured that a direct-probe hash table didn't fill up was
to limit the number of entries to some value less than the size of the
table, so you'd have to look at the code that adds entries to and removes
entries from the table.  Typically that code keeps count of the number of
occupied entries, and deletes entries if adding a new entry would cause the
table to get "too full."

Simply using a count might still result in some lookups taking a long time
if the statistics broke just wrong, which is why I seem to remember liking
to limit the capacity to 3/4 of the size.

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