On 19 Feb 2013 18:39:40 +0000, Chris Young wrote:
> > Any suggestions on how to work around this bug would be
appreciated,
> > as I have no idea how long it will take for a fix to be released.
>
> UnixLib, the C (and more) runtime library used in the RISC OS NS build,
> uses Doug Lea's malloc implementation (cfr.
http://g.oswego.edu/dl/).
> Perhaps that's an option for you.
That's what I was trying to link in as a replacement, but some
libraries still seemed to be using the newlib one, hence freeing
within NetSurf was crashing. I'm wondering whether that is due to the
lib in question being dynamically linked. I'll have a play with my
buildsystem and try again.
Actualy dlmalloc needs some work to actually allocate memory, which is
beyond my understanding, so I wrote something a bit simpler.
However, same problem. It works fine if I replace all the textarea
internal malloc/realloc/free calls to use my functions, but a global
replacement of them isn't working for some reason.
I suspect crazy #ifdeffing of that file won't go down well, but I do
at least have a buildable version here that doesn't exhibit problems
after using a few textareas.
I'm toying with the idea of patching newlib.library, as convincing
either developers or betatesters that it has a problem is proving more
difficult than anticipated. Might be a _very_ bad idea though - I'd
rather work around it in NetSurf as that has less wide-ranging
consequences.
Chris