[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nedit-develop
Subject:    Re: Improved GC patch, was Re: [ nedit-Bugs-1906837 ] long list
From:       AVKuznetsov <kuzn () htsc ! mephi ! ru>
Date:       2008-05-16 9:24:27
Message-ID: 20080516132427.a183e69a.kuzn () htsc ! mephi ! ru
[Download RAW message or body]

On Thu, 15 May 2008 20:06:02 +0200
Tony Balinski <ajbj@free.fr> wrote:

> Quoting Tony Balinski <ajbj@free.fr>:
> 
> > Quoting Tony Balinski <ajbj@free.fr>:
> >
> > > Since I find I am unable to add a patch to the sourceforge bug report
> > > mentioned above (am I missing some privileges here?), I'm sending this
> > > patch to the list for perusal.
> > >
> > > Share and enjoy!
> > >
> > > Tony
> >
> > Oops, didn't notice this wasn't a context diff... sorry. Here's the patch
> > again!
> > T
> 
> And now I've found a bug in the patch! You can correct the patch file easily
> by deleting the exclamation in the line:
>     +    if (!p) {
> within the changes for the function
>      char *AllocStringNCpy(const char *s, int length)
> It's pretty obvious. I'm just a little astonished that I never hit that
> condition! I suppose the function isn't much used (if at all).
> 
> Tony

Thank you Tony!

The problem is solved partly, but nedit does not hang the system now.
I tested it with two cycles.

for(...)
   string = string "string" # arithmetical progression, linear memory growth

and

for(...)
   string = string string  # geometric series, power-like growth 

The patched nedit correctly does the first cycle and crashes
with the message "Error: Cannot perform malloc" executing the second one.

Both cycles executed by CVS nedit lead to hanging of my laptop.

I think, such a crashing is "more correct" then a hanging.

Alexey
-- 
NEdit Develop mailing list - Develop@nedit.org
http://www.nedit.org/mailman/listinfo/develop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic