Eli Zaretskii writes: >> >> /* Define MATCH_MAY_ALLOCATE unless we need to make sure that the >> searching and matching functions should not call alloca. On some >> systems, alloca is implemented in terms of malloc, and if we're >> using the relocating allocator routines, then malloc could cause a >> relocation, which might (if the strings being searched are in the >> ralloc heap) shift the data out from underneath the regexp >> routines. > > > The first part is not obsolete, but its reasoning is backwards: > SAFE_ALLOCA indeed can call malloc, but it could only cause relocation > if REGEX_MALLOC is defined (and ralloc.c is compiled in). And when > you define REGEX_MALLOC, MATCH_MAY_ALLOCATE is undefined. So the text > there should be revised. Everything you've said makes sense after your last message, but I'm still unable to put it together and come up with a revised comment. Could you make a suggestion? Here are the rest of the changes.