Summary: | eix-0.2.6 returns corrupt search results | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | David Held <andukar> |
Component: | New packages | Assignee: | Benedikt Böhm (RETIRED) <hollow> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | emilbeinroth, jason+gentoobugs, ncolgan, rossen |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch to fix the problem
Cleaner patch |
Description
David Held
2005-07-04 10:04:48 UTC
Yep, same problem here same here Would be great if you could post the output of the following command: ldd /usr/bin/eix | grep stdc 16:25 drheld@bork:~ $ ldd /usr/bin/eix | grep stdc libstdc++.so.5 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5 (0xb7f19000) It looks like the bug comes from package.cc:112 DB_READ_USHORT( this->input_stream, numVersions ); After that call, numVersions is being set to a bogus value (it varies based on what is searched for, but seems to be reasonably static for a given search) stating that there are > 10000 versions. Created attachment 62721 [details, diff]
Patch to fix the problem
It looks like the problem was actually with data being preread, but not being
marked as so. As such, the offset in the database that was expected was not
what was being encountered.
2 line patch fixes the problem.
Created attachment 62722 [details, diff]
Cleaner patch
Actually, it looks like the code tried to set this->have, but the breaks caused
it to only happen in one case. This patch does the same thing as the last one
but is cleaner in that it removes the redundant line as well.
in cvs |