[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #33125] make fails building android build environment due to memory
Paul D. Smith
[bug #33125] make fails building android build environment due to memory corruption
Mon, 02 May 2011 06:15:32 +0000
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:184.108.40.206) 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:
Message sent via/by Savannah
- [bug #33125] make fails building android build environment due to memory corruption,
Paul D. Smith <=