bugmake - Bugs: bug #16088, "make -r" causes...

 
 

bug #16088: "make -r" causes "virtual memory exhausted" error in make on AIX only

Submitted by:  None
Submitted on:  Tue 14 Mar 2006 10:21:47 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.80Operating System: POSIX-Based
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.

 

Tue 14 Mar 2006 01:51:55 PM UTC, comment #1:

This is a duplicate of bug #2888. If you like you can try the latest release candidate; currently ftp://alpha.gnu.org/gnu/make/make-3.81rc1.tar.gz

Paul D. Smith <psmith>
Project Administrator
Tue 14 Mar 2006 10:21:47 AM UTC, original submission:

This bug causes make to fail on AIX only.

To recreate:

Create 2 makefiles, "Makefile", and "sub.mk"...

"Makefile" contents:

_________________________
default:
make -r sub.mk
_________________________

"sub.mk" contents:

_________________________
default:
_________________________

Place both makefiles in the same directory, and then run, "make". You'll see an error like this:

_________________________
running sub.mk
make -r sub.mk
make[1]: Entering directory `/tmp'
make[1]: *** virtual memory exhausted. Stop.
make[1]: Leaving directory `/tmp'
make: *** [default] Error 2
_________________________

It appears that the problem is that 'make' allocates space for structures to hold the built-in rules. However, when you run make with the "-r" flag to disable these built-in implicit rules, make still attempts to allocate space for them. Since the space required to hold zero built-in rules is zero bytes, it calls:

malloc(0)

AIX doesn't like such a request, and the malloc fails. Other Unix and Linux platforms seemingly handle this abnormal condition more gracefully.

A temporary work-around is to add a rule such that 'make' mallocs >0 bytes. For example, by changing Makefile to that shown below, the problem is masked and the make continues:

_________________________
%.xxxxx: %.yyyyy

default:
make -r sub.mk
_________________________

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 14 Mar 2006 01:51:55 PM UTCpsmithStatusNone=>Duplicate
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1