bug-make
[Top][All Lists]
Advanced

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

[bug #33125] make fails building android build environment due to memory


From: Paul D. Smith
Subject: [bug #33125] make fails building android build environment due to memory corruption
Date: Mon, 02 May 2011 06:15:32 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16

Follow-up Comment #3, bug #33125 (project make):

So I'm happy to make this change, because it does seem cleaner, but I must
confess I don't understand how the original error is caused by it.

The code uses isspace() to count spaces the first time through the list. 
isspace() matches spaces and tabs, but also form feeds, carriage-returns, etc.
 The second loop skips ONLY spaces and tabs.

So it seems that the only possible problem here would be that the first loop
counts TOO MANY words and allocates TOO MUCH memory: more than is necessary. 
I don't see any way for the current code to UNDER-allocate the space for the
array, unless for some bizarre reason either space or TAB characters are not
matched by isspace() which seems impossible.

Can you provide me with a repro test case?  Even just the contents of the
string that were passed to the $(sort ...) function would be helpful.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33125>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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