* PATCH: Re: Bug w/matching control
@ 2001-03-08 5:42 Felix Rosencrantz
0 siblings, 0 replies; 2+ messages in thread
From: Felix Rosencrantz @ 2001-03-08 5:42 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
Here's the patch I mentioned before.
I use to have access to purify, which does a great job at memory leak detection
and many other memory related problems. I no longer have access to purify.
Maybe someone who does could, run zsh through purify for with the tests. I
would also use an instrumented version as I worked during the day.
Is there good freely available memory leak detection package that works on
linux?
-FR
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
[-- Attachment #2: comppatch.txt --]
[-- Type: text/plain, Size: 402 bytes --]
Index: 54compmatch.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/54compmatch.ztst,v
retrieving revision 1.10
diff -r1.10 54compmatch.ztst
623a624,630
> test_code $workers_13320_matcher workers_13320_list
> comptest $'tst g-2\t'
> 0:Test from workers 13563
> >line: {tst glibc}{-2.1.94-3.i386.rpm}
> >COMPADD:{}
> >INSERT_POSITIONS:{9:27}
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH: Re: Bug w/matching control
@ 2001-03-05 10:45 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2001-03-05 10:45 UTC (permalink / raw)
To: zsh-workers
Felix Rosencrantz wrote:
> I'm seeing a problem with matching control and characters being deleted. I'm
> using the data from workers/13320
>
> I've attached a patch to 54compmatch. I think the output should be the same as
> the previous testcase. Though this time with input of "g-2", we get a
> "glibc-", with the 2 deleted. This isn't checked in, since it won't pass.
Yes, it should. There was a place where it still didn't search hard
enough for compatible anchors to merge.
The patch also contains some fixage in cursor positioning and a
corresponding patch in 54compmatch (sorry if that interferes with your
patch, Felix).
Bye
Sven
Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.31
diff -u -r1.31 compmatch.c
--- Src/Zle/compmatch.c 2001/01/25 15:16:28 1.31
+++ Src/Zle/compmatch.c 2001/03/05 10:43:30
@@ -2001,8 +2001,7 @@
else
oo = to;
o = to;
- }
- if (tn) {
+
diff = sub_join(o, n, tn, 0);
o->flags |= CLF_MISS;
@@ -2064,6 +2063,29 @@
}
continue;
} else {
+ for (tn = n; tn; tn = tn->next)
+ if ((tn->flags & CLF_NEW) ==
+ (o->flags & CLF_NEW) &&
+ cmp_anchors(tn, o, 1)) break;
+
+ if (tn) {
+ if ((diff = sub_join(o, n, tn, 0))) {
+ if (po) {
+ po->flags |= CLF_MISS;
+ po->max += diff;
+ }
+ else {
+ o->flags |= CLF_MISS;
+ o->max += diff;
+ }
+ }
+ n = tn;
+ po = o;
+ o = o->next;
+ pn = n;
+ n = n->next;
+ continue;
+ }
if (o->flags & CLF_SUF)
break;
Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.34
diff -u -r1.34 compresult.c
--- Src/Zle/compresult.c 2001/01/22 12:03:56 1.34
+++ Src/Zle/compresult.c 2001/03/05 10:43:31
@@ -253,7 +253,7 @@
opos = npos;
addlinknode(posl, (void *) ((long) npos));
}
- if (((pmax < (l->max - l->min) || (pma && l->max != l->min)) &&
+ if (((pmax <= (l->max - l->min) || (pma && l->max != l->min)) &&
(!pmm || (l->flags & CLF_MATCHED))) ||
((l->flags & CLF_MATCHED) && !pmm)) {
pm = cs; pmax = l->max - l->min; pmm = l->flags & CLF_MATCHED;
@@ -307,7 +307,7 @@
opos = npos;
addlinknode(posl, (void *) ((long) npos));
}
- if (((smax < (l->min - l->max) || (sma && l->max != l->min)) &&
+ if (((smax <= (l->min - l->max) || (sma && l->max != l->min)) &&
(!smm || (l->flags & CLF_MATCHED))) ||
((l->flags & CLF_MATCHED) && !smm)) {
sm = cs; smax = l->min - l->max; smm = l->flags & CLF_MATCHED;
Index: Test/54compmatch.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/54compmatch.ztst,v
retrieving revision 1.8
diff -u -r1.8 54compmatch.ztst
--- Test/54compmatch.ztst 2001/01/28 19:37:30 1.8
+++ Test/54compmatch.ztst 2001/03/05 10:43:31
@@ -570,7 +570,7 @@
test_code $workers_11388_matcher workers_11388_list
comptest $'tst :\t'
0:Non-bug from workers 11388
->line: {tst }{.:}
+>line: {tst .:}{}
>COMPADD:{}
>INSERT_POSITIONS:{4:5:6}
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-03-08 5:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-08 5:42 PATCH: Re: Bug w/matching control Felix Rosencrantz
-- strict thread matches above, loose matches on Subject: below --
2001-03-05 10:45 Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).