memory leak in KJS

André Wöbbeking Woebbeking at onlinehome.de
Sat Jan 29 10:00:04 GMT 2005


On Saturday 29 January 2005 05:39, George Staikos wrote:
> On Friday 28 January 2005 21:19, Harri Porten wrote:
> >
> > There's one known leak in the parser that occurs when the parser
> > hits a syntax error. In that case the bison generated will unwind
> > and leave the memory allocated for string tokens without an owner.
> > Last time I tried to solve it I realized how difficult it is to do
> > with bison. Having a pool of strings allocated during parsing (that
> > could be freed in the end if they are unused might be a
> > possibility).
>
>   I had this problem in Kst also.  I solved it by adding a ridiculous
> number of error paths into the syntax and cleaning up recursively in

Exception handling would be nice in this case but I know that this is 
still unwanted in KDE :-( 

> those cases. It's unfortunately messy, and for the few bytes it
> consumes, I guess it's probably not worth the effort in most cases.

As I wrote I got many of this leaks because many sites use more or less 
broken javascript which can sum up over a browsing session.




More information about the kde-core-devel mailing list