Bug 860 - bad guard in find_recover_state do-while loop
Summary: bad guard in find_recover_state do-while loop
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: regex (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-19 01:02 UTC by Serge van den Boom
Modified: 2005-09-27 05:50 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge van den Boom 2005-04-19 01:02:39 UTC
While compiling the regex code with extra warnings on, from outside libc, quite 
a lot of warnings were reported. While these warnings were very justified, most 
of the underlying problems would not cause the actual code to behave in a non-
intended way. But one is very much a bug:
In find_recover_state, err is compared to REG_NOERROR, while it is *err which 
should be compared instead. Because of this the do-while loop will always 
terminate after one iteration.

I was working on getting rid of all the warnings in the regex code, which was 
taking quite a bit of time, as I needed to make sure I'm fixing the actual 
problems, and not (just) the symptoms. But then I noticed that the GNU coding 
guidelines stopped just short of saying "Listening to warnings to find a few 
bugs is not worth the effort.", which would explain the mess I'm encountering. I 
am willing to continue my work and submit a big patch with fixes that will clean 
up this code somewhat, but before I continue, I'd like to know whether such a 
patch will actually stand a chance of getting accepted.
Comment 1 paolo.bonzini@lu.unisi.ch 2005-04-19 06:57:33 UTC
Subject: Re:  New: bad guard in find_recover_state do-while
 loop


>I'd like to know whether such a 
>patch will actually stand a chance of getting accepted.
>
FWIW, I'm willing to "sponsor" such a patch.

You can attach it here and I'll review it even though I cannot approve it.

Paolo

Comment 2 Ulrich Drepper 2005-09-27 05:50:46 UTC
The referenced bug has since been fixed.