>>>> AA == Adrian Aichner writes:
AA> Marcus,
could you please give the setting of
AA> KKCC_BT_STACK_SIZE
AA> some more thought.
Definitely: I'll move to dynamic allocation of the backtrace stack, because
the stack size depends on dynamically allocated data.
In your crash, the benchmark creates lists with a few million elements,
which leads to a backtrace stack containing a few million entries. To cover
this special case statically with a big value for KKCC_BT_STACK_SIZE does
not make sense: it would be a waste of memory for most applications,
whereas it would still be easy to create an application which again
exceedes the limit.
The only way to catch everything (despite of full memory exhaustion, of
course) is to allocate the stack dynamically. I should have
realized this earlier; I'll work on that next week.
AA> We need to find a way for ERROR_CHECK_GC to not CAUSE crashes, else it
AA> is doomed.
This is not a general problem of ERROR_CHECK_GC (actually, in your tests
this crash should only be triggered by DEBUG_XEMACS). The problem is, that
I chose a static data structure (I chose a static data structure
because it is fast and it is already used in pdump's backtrace. But
estimating a working backtrace size limit at dump time is easier than
during run time).
AA> Which parts of KKCC error checking is actually enabled by
AA> --error-checking
This checks that marked data really is a Lisp_Object, and that not already
freed data is marked. It does not use any additional memory, but it is more
time intensive.
AA> and which by
AA> --debug
The KKCC backtrace is the only debug mechanism for KKCC. Before the
backtrace there was no debugging aid. It consumes a lot of additional memory
(as you experienced) and a little bit more time (some assignments and the
time it takes to manage a stack, which will be higher for a dynamically
allocated stack).
AA> While --debug should not slow down XEmacs, --error-checking is known
AA> and specified to do so.
KKCC follows these specifications.
--
Marcus