sh leaks memory
|Reported by:||bhaible||Owned by:||bonefish|
When executing large configure scripts, the 'sh' process gets bigger and bigger.
While running a configure script in tight memory situation, I got an application crash. Clicking on the "Debug" button of the error dialog, I was presented a gdb session the shell that was executing the configure script. At the top, function fork().
- Start Haiku in QEMU with 256 MB RAM allocated to it,
- Open a Terminal.
- $ tar xvfz testdir3.tar.gz
- $ cd testdir3
- $ ./configure --host=i586-pc-haiku --build=i586-pc-haiku
--prefix=/boot/home/config CPPFLAGS="-Wall" 2>&1 | tee log1
- Repeatedly do "ps". After some time, the "sh" process uses
40 MB user memory and 100 MB kernel memory. And it gets more and more... Until either a message "Out of memory" or a crash. Such a shell script should be executable in 10 MB.