bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make 3.80 eval/variable_buffer bug


From: Craig Ruff
Subject: make 3.80 eval/variable_buffer bug
Date: Wed, 30 Jun 2004 13:04:40 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

It appears that make 3.80 is not reentrant in the use of variable_expand_string/variable_buffer_output and the static variables variable_buffer_length and variable_buffer. I tripped across this while using $(eval ...) in a make file. If the argument to $(eval ...) is large enough (more than 200 bytes), variable_buffer_output calls xrealloc to reallocate variable_buffer, trashing the assumption that the earlier activation record of variable_exapand_string has about the contents of variable_buffer. This can cause a call to xrealloc with a negative number that gets converted to a rather large unsigned integer as the size and the realloc fails.

Obviously the introduction of $(eval ) failed to take into account the use of these static variables. Does anyone have a patch for this? If not, a substantial rewrite is in the cards for some or all of the files amiga.c, expand.c, function.c, read.c and remake.c. I can probably produce the patch, but wanted to check first to see if someone has a patch. It appears the CVS source does not fix
this issue.

Please reply to me, as I am not subscribed to the list.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]