Gunnar Evermann <ge204(a)eng.cam.ac.uk> writes:
GCPROing should not be necessary because of "caller gcpros"
but we
are not protecting in the caller either (Fmapconcat only protects
its third argument sep for some reason). Actually the caller of
Fmapconcat should do it (execute_optimized_program() presumably).
Unless I am misreading the code, execute_optimized_program() GCPRO's
all the arguments on the stack, which should include those Ffuncall()
is called with.
However, the test suite code is called in both interpreted and
compiled code, and I for the life of me cannot remember which one
caused the crash. But then again, Feval() also appears to GCPRO'ing
the arguments to subrs correctly.
As for GCPRO'ing SEP, it might be historical slackness toward old code
that called Fmapconcat() directly. I think removing that GCPRO is
just as safe or unsafe, as the case may be, as not GCPRO'ing FN and
SEQ.
I suggest someone who *can* reproduce the problem adds some GCPROs
and checks whether they make a difference.
The problem is: I can no longer reproduce the crash. :-(
I've even tried lowering gc-cons-threshold and stuff, but to no avail.
As Martin once said: with memory corruption bugs, *any* change can
remove the crash. I should probably undo some updates, but I don't
have any idea which ones those should be.
Raymond, Colin, can you reproduce mapconcat-related crashes?
Alternately, could you go to line 177 of `base64-tests.el' and change
`when nil' to `when t' and see if `make check' crashes on Base64
tests?
If one of you can still repeat the crash, I'll prepare a patch to test
if additional GCPRO's in Fmapconcat() fix things.