bugmake - Bugs: bug #14917, Make dies with 'virtual memory...

 
 

bug #14917: Make dies with 'virtual memory exhausted'

Submitted by:  None
Submitted on:  Fri 04 Nov 2005 08:50:56 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.80Operating System: MS Windows
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 04 Nov 2005 09:03:02 PM UTC, comment #1:

This is an instance of bug #1517.

You can try the latest beta, here ftp://alpha.gnu.org/gnu/make/

Paul D. Smith <psmith>
Project Administrator
Fri 04 Nov 2005 08:50:56 PM UTC, original submission:

I've got a fairly complex makefile that causes make 3.80 to die with a 'virtual memory exhausted' error.

I've traced the problem to the func_eval call. It is possible for eval_buffer to re-allocate the variable_buffer buffer. If this happens func_eval will not catch it and will not return an updated 'o' pointer. The end result is that whatever is calling func_eval will get confused. A subsequent call to variable_buffer_output calculates a negative buffer length causing xrealloc to fail.

I've locally updated func_eval to the following, though I'm not sure it is the correct thing to do.

static char *
func_eval (o, argv, funcname)
char *o;
char **argv;
const char *funcname;
{
int l;
/* eval_buffer may cause variable_buffer to
* be re-allocated. If that happens I need
* to adjust o so that it points to the correct location
*/
l = o - variable_buffer;
eval_buffer (argv[0]);
o = variable_buffer + l;

return o;
}

I've attached both my callstack at the point where realloc fails and when the realloc is happening in the func_eval call.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2716:  callstack.txt added by None (2KiB - text/plain - Callstacks when realloc fails and when variable_buffer changes)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 04 Nov 2005 09:03:02 PM UTCpsmithStatusNone=>Duplicate
  Open/ClosedOpen=>Closed
Fri 04 Nov 2005 08:50:56 PM UTCNoneAttached File-=>Added callstack.txt, #3084

Back to the top


Powered by Savane 3.1-cleanup1