Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2018-04-13T17:51:00Z
Lists: pgsql-bugs
Arthur Zakirov <a.zakirov@postgrespro.ru> writes: > On Thu, Apr 12, 2018 at 06:14:03PM -0400, Tom Lane wrote: >> But I see from the code coverage report that this bit is unexercised >> in the regression tests. Any chance of getting a test that covers >> this? I'm worried that this means we also lack any coverage of >> cases where the CompoundAffix array has more than one entry. > I attached the patch. It fixes the following: > - show an error if actual number of affix aliases is greater than > initial number. I wonder is it necessary. But I think it is better to > raise an error than crash, if you set wrong number for AF flag. Good idea, but I tweaked the message wording a bit. > The code coverage still isn't 100% for spell.c. But it is better than > earlier. Indeed. Pushed, thanks! regards, tom lane
Commits
-
Improve regression test coverage for src/backend/tsearch/spell.c.
- 8bf358c18ec9 11.0 landed
-
Fix bogus affix-merging code.
- ac8ea0f27f3f 9.3.23 landed
- f71d803c8de8 9.4.18 landed
- 906e44d4dc83 9.5.13 landed
- 65a69dfa08e2 11.0 landed
- 40132187ed6a 10.4 landed
- 0f439c8dd289 9.6.9 landed