Opened 21 years ago
Last modified 19 years ago
#28 closed defect (released)
Uninitialised memory referenced with partial match
Reported by: | Richard Boulton | Owned by: | Olly Betts |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Library API | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Robert Pollak | Blocked By: | |
Blocking: | Operating System: | Linux |
Description
Following these steps causes Xapian to reference uninitialised memory:
1) Perform a search which matches, say, 5 documents. 2) Call get_mset(1, 10) - ie, starting at the second hit, and returning more hits than are available. 3) Iterate through the resulting mset, calling get_document() on each item returned. 4) When the iteration reaches the 5th document, get_document() will refer to uninitialised memory.
The attached patch to apitest demonstrates this problem - to reliably cause the test to fail it needs to be run under valgrind.
Attachments (1)
Change History (3)
by , 21 years ago
comment:1 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed, robert.pollak@fabasoft.com |
We were failing to subtract firstitem when indexing into items. Will be fixed in CVS HEAD shortly (I'm just looking for a testcase which doesn't require valgrind).
Testcase (patch to api_db.cc)