OK, both Norbert and I have observed crashes with my patch.
I tried GCPRO_STACK before Bset_buffer. That did not prevent another
crash.
The equal methods might as well be userland, there are so many of
them.... I didn't try to do that, though, because I don't know where
equal might be called (I first caught it in "Bmember", is there a
"Bassoc"? and then "Bequal" codes themselves, urg).
>>>> "ms" == Michael Sperber
<sperber(a)informatik.uni-tuebingen.de> writes:
Hrvoje> Doesn't set-buffer change the values of all buffer-local
Hrvoje> variables? I'm not sure if buffer-local vars can be
Hrvoje> dontuse-ed, but if they can, Bset_buffer can GC.
ms> It can theoretically call GC, but not in that place. (Look at
ms> get_buffer.) I guess the equal methods might GC, or that's
ms> what the code assumes, anyway. So I guess we stick a
ms> GCPRO_STACK there, too.
ms> Do you want me to take this again from now on, Stephen?
ms> (Again, many, many thanks.)
Please. I've spent some time tracing some of the calls and concluded
that I simply don't have the background to do this effectively. But
if you have a question, I'll be happy to try to describe what I've
looked at so far (FWIW).
My current experiment is to keep the GCPRO(stack[1]), and put a
GCPRO_STACK in front of the while (there's more bytecode) loop. But I
don't even know if that would do the right thing at all (and haven't
even run make check to be sure weak tests pass :-/).
That should give you an idea just how little I grok this. :-/
ms> The general implementation strategy for the byte-code is kind
ms> of brain-dead, anyway. It sure isn't suitable for anything
ms> but tectonic performance, that's for sure.
Uh-oh. Not the byte-interpreter, too!
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.