[Top][All Lists]

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

bug#13472: Execution mode can hang pc when parameter refers to big file

From: Bob Friesenhahn
Subject: bug#13472: Execution mode can hang pc when parameter refers to big file
Date: Thu, 17 Jan 2013 09:29:47 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Thu, 17 Jan 2013, Pavel Raiskup wrote:

Hi liboolers,

the problem — e.g. running the:

 libtool execute ls BIGfile

could stack computer atm (if user has swap enabled and) if the BIGfile
refers to really big file not containing new-lines.

For more info see the bug:



The problem is that libtool is trying to guess whether the 'BIGfile' is
ltwrapper or not (I guess).  One step in this check is that libtool runs
sed for 'head' purposes:

 sed -e 4q BIGfile

The problem of this sed command is that it is probably buffering whole
"binary lines" (which may have gigabytes) into memory.  Don't know "how"

This seems like a problem even on larger machines. Executables and libraries can be rather large files. If sed does absorb the whole file (reading tens of megabytes, or even over 100 MB, for debug builds) then there is an efficiency loss.

Since libtool has a configure script, it can test for whatever features are needed and provide a portable fallback in case 'dd' is not available.

Everything would be easier if libtool would arrange to build a small helper executable in the build tree which it can used instead of system tools. Libtool already builds a native executable in some cases. This would diminish portability concerns and improve performance. The main issue with this is that for cross-builds, a system native compiler needs to be used to build the helper executable.

Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

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