Here's what I've got so far:
The 'args' field of the Lisp_Compiled_Function object that is the
function value of zmacs-make-extent-for-region is incorrect. The first
slot, i.e. f->args[0] should be the symbol 'region' but instead it is
the symbol 'from-string'. This seems to be the way it arrives from the
xemacs.dmp file. In fact, the f->args array appears to be exactly the
one that belongs to the function perform-replace, i.e. args[0] is
'from-string', args[1] is replacements, args[2] is query-flag, and so
on. In fact, it turns out that the f->args array in perform-replace is
== to the one in zmacs-make-extent-for-region, i.e. both functions point
to the same args array. This condition seems to have occurred during
dumping, because the two function objects have identical values before
relocation after reading the dump file. The most likely culprit I can
see is the hashing code in dump.c. It seems likely that somehow these
two arrays are getting thrown in the same hash bucket. Why turning on
error checking makes the problem go away is a mystery. I can only guess
that it perturbs the data just enough to avert a rarely occurring bug.
It does happen whether or not it's compiled with optimization.
I'll try to look at this more tomorrow, but any advice is welcome.
Stephen J. Turnbull wrote:
>>>>>"Eric" == Eric Benson
<eric_a_benson(a)yahoo.com> writes:
>>>>>
>>>>>
Eric> Can I assume this was already fixed on those other
Eric> platforms, but the fix did not make it to Darwin? Can
Eric> someone fill me in on the fix, so I can apply it to the
Eric> Darwin version as well?
No. As far as I know this has not been diagnosed.