Re: Balsa hanging, error located but not fixed



On Thu, 10 May 01:44 Julian M Catchen wrote:
| Ok, a few weeks ago, I zipped up what looked like a normal message and
| sent it to this list, asking if anyone could verify if it displayed
| correctly. For me, it was causing Balsa to totally hang.

I got this too just now.

| A few people responded and said that it worked fine.  So, I deleted it
| and didn't worry about it (although it continued to make balsa hang
for
| me).  Now, I have found a second email today that did the same thing. 
| Perfectly normal email, causes balsa to totally hang.  So, I ran it
through gdb
| and found that it is entering into an infinite loop at the following
place:
|     
| src/quote_color.c, line 77  while (regexec(rex, str + off, 1, rm, 0)
== 0)
| {
| 
| The call to the function, regexec(rex, str + off, 1, rm, 0), was never
| returning.  
| It was choking on this line of text from the message:
| 
| ################################################################################
| 
| Here is my regular expression: ^(([ \t]|)*[|>:}#])+

I use a different RE for finding quoted lines as follows :-
		^([^[:space:][:upper:]]*([|>}]|[:%][^-]))+
(I rewrote it for ... er ... clarity and also it doesn't think smileys
are quoted lines!)

| When I change my regular expression to this: ^(([ \t]|)*[|>:}])+  it
| works fine.

Eliminating the '#' fixes it in my RE too.

| So, the question is, is this a bug?  Or, is it my fault for having a
| funky regular expression?

I reckon its a bug in the RE code.

--
Brian Stafford




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