[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] status of patches: 11/13

From: David Lawrence Ramsey
Subject: Re: [Nano-devel] status of patches: 11/13
Date: Sat, 15 Nov 2003 17:10:46 -0800 (PST)

--- address@hidden wrote:


>My memleak patch sometimes segfaults when resizing the window and I
>don't know what causes it. The first patch is not affected and the
>uninitialized variable in color.c did not fix the problem. The only
>thing I can think of is that the resize handler is preempting
>regexec_wrapper after it frees the regex_t but before it recompiles it.
>I haven't looked into how resize works but could this be happening?

I think so.  If I understand things correctly, the siglongjmp() in the
resize handler makes nano jump back to the edit window while it's in the
middle of recompiling the regexes, it'll end up in an unstable state
since some of the regexes will have been freed but not yet reinitialized
and will hence be pointing to garbage, and the display routines will
then try to access them.


>Increasing the '100' value in regexec_wrapper would increase the time
>between pauses when scrolling. It would also increase nano's memory
>usage slightly, as noted in the comment, but I don't think it would
>slow down the regexec matches that much, at least not as much as it
>does when regexec is using 100meg. I'll let someone else determine the
>best value.  :)

Okay then.  It seems all right to me as it is at the moment.


>I released a third patch about a week ago but was unable to let you
>know due to connection problems. The new patch adds CTFLAG_DEFAULTCOLOR
>and two unreleased patches will add CTFLAG_NEXT and CTFLAG_FORCED.
>These flags are only used in parse_colors() and parse_rcfile()
>functions and could be moved to nano.h but I don't see why you would
>want to make them global.

I wasn't thinking of making them global, just more visible.  Maybe at
the top of rcfile.c instead?

>My patches are now located at


I've been able to reconcile the changes in my version with your 0-2
patch, available at:

Most of the changes, aside from the parse_include() restructuring, are
cosmetic.  I also made one minor change to the values of your new flags:
since they're binary flags, I made them use (1<<0) and (1<<1) (which are
the same values anyway) instead of 1 and 2, as the flags in nano.h do.

Sluggy.Net: The Sluggy Freelance Community!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]