Ticket #304 (Fixed)Thu Aug 30 13:03:44 UTC 2012
Build:InstRes fails with "out of memory" when lots is available
Reported by: | Sprow (202) | Severity: | Normal |
Part: | RISC OS: C/C++ toolchain | Release: | |
Milestone: | Status | Fixed |
Details by Sprow (202):
Spotted when recreating InetSetup’s makefile.
If all of the files are done in one step (including the blanks and autosense stuff) the script fails due to out of memory.
I worked around this by making up an intermediate rule in the makefile which did the stuff in subdirectories.
It doesn’t seem to be related to total number of files requiring copying, so perhaps it’s something to do with hunting subdirectories?
Changelog:
Modified by Jeffrey Lee (213) Thu, October 11 2012 - 23:00:08 GMT
Looks like it might be a bug in Perl to me. With verbose mode enabled it fails even before it prints anything (and for me it’s a “Not enough memory, malloc failed, heap overwritten” message rather than a standard “out of memory” one).
Running the same command directly from a taskwindow, or invoking amu from a taskwindow, seemed to work, as did tweaking things and then running Builder again. Perhaps an uninitialised variable somewhere.
Modified by Sprow (202) Sat, May 11 2013 - 14:16:59 GMT
Saw this again today while recreating the makefile for Sources/Apps/Squash.
As I had my thinking trousers on, I noted that there was something about the length of the line of things to install – at 380 characters all was well, 381 => bang (message as above).
I note from perl’s !Help it was from 1996, is it that it doesn’t understand command lines > 256?
Modified by Sprow (202) Mon, May 27 2013 - 09:08:17 GMT
- Status changed from Open to Fixed
Having finally spotted where the sources to Perl were I had a look. Nothing in the command line parsing leapt out as wrong (it uses malloc and strlen and other sensible stuff).
Having rebuilt the binary with cc 5.69 it then seemed to work, and I was able to toggle between the old and new binary which did and didn’t cause the above error. So I’m guessing it was some compiler fault.
Or, at least, the problem is kicked under the carpet.
New binary imported and tagged as Perl-2013-05-27