www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/20/00:29:28

From: "Mark E." <snowball3 AT softhome DOT net>
To: djgpp-workers AT delorie DOT com
Date: Wed, 20 Jun 2001 00:27:01 -0400
MIME-Version: 1.0
Subject: libtool's max cmd line crash
Message-ID: <3B2FEDD5.12239.459453@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

Hello mystery fans,

I believe I found out why libtool's maximum command line test causes a 
crash. This test creates an ever increasing command line. The size of the 
command line eventually gets big enough to force Bash to create a response 
file.

To help track down why these crashes were occuring, I modified Bash to not 
delete the response file. I created a program that does nothing but 
returns 0. When given the response file on the command line, the program 
crashed.

It turns out generated response file contains three arguments. The first 
one is about ~262,000 bytes long (!), the other two take up just a few 
bytes.

Once the response file is processed, expand_wildcards is called which then 
calls glob to expand any wildcards, etc. glob allocates a 2000 byte buffer 
for an argument, but the mega argument is over 250K.

It's no wonder libtool's test causes problems. Unfortunately, it also ends 
up causing my machine to reboot among other bad things.

Mark

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019