Page 2 of 2

Re: ARexx - potential bug or just a badly written script?

Posted: Wed Sep 10, 2014 3:44 pm
by chris
xenic wrote:My takeaway from this topic is that some fixes are needed in OS4. It might be interresting to see if a C program can produce the same excess memory consumption by performing a large number of consecutive data writes to a file in ram: like the ARexx and DOS scripts.
There's a chance that ram-handler's buffer (or some buffer in DOS) uses realloc(), in which case it might be affected by this bug, which seems to have suspiciously similar symptoms.

Re: ARexx - potential bug or just a badly written script?

Posted: Wed Sep 10, 2014 5:46 pm
by xenic
chris wrote:There's a chance that ram-handler's buffer (or some buffer in DOS) uses realloc(), in which case it might be affected by this bug, which seems to have suspiciously similar symptoms.
The problem must go deeper than newlib because I'm pretty sure ARexx (which is still 68k) doesn't use newlib. Perhaps it's the bug that Joerg mentioned and Solie doesn't want to reveal. Your test case and my AmigaDOS test (shown earlier in this topic) could be considered extreme cases but I think Belxjander's ARexx script would be a typical way of writing a large amount of text to a file with ARexx.

Re: ARexx - potential bug or just a badly written script?

Posted: Wed Sep 10, 2014 5:51 pm
by chris
xenic wrote:The problem must go deeper than newlib because I'm pretty sure ARexx (which is still 68k) doesn't use newlib.
It probably doesn't, but then I thought you'd eliminated ARexx as the cause by reproducing the problem with a DOS script?
I agree it's quite likely the realloc bug is actually a bug somewhere in Exec's memory handling.