Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in the internal record compression routines [CORE3115] #3493

Closed
firebird-issue-importer opened this issue Aug 23, 2010 · 16 comments
Closed

Bugs in the internal record compression routines [CORE3115] #3493

firebird-issue-importer opened this issue Aug 23, 2010 · 16 comments

Comments

@firebird-issue-importer

Submitted by: @ibprovider

1. SQZ_decompress

while (input < last)
{
const int len = (signed char) *input++;

if (len < 0)
{
if(input == last) // <----- !!!
{
BUGCHECK(179); //! \todo Use an other BUGCHECK code
}

const UCHAR c = \*input\+\+;

---------
2. SQZ_differences

while (end1 - rec1 > 2)
{
if (rec1[0] != rec2[0] || rec1[1] != rec2[1])
{
p = out++;
/* cast this to LONG to take care of OS/2 pointer arithmetic
when rec1 is at the end of a segment, to avoid wrapping around */

const SCHAR* yellow = (SCHAR *) MIN((U_IPTR) end1, ((U_IPTR) rec1 + 127)) - 1;

while ( (rec1 <= yellow && rec1[0] != rec2[0]) ||
(/*1*/ rec1 < yellow /*1*/ && /*2*/ rec1[1] != rec2[1] /*2*/) ) // <----- !!!
{

Commits: da81e6b f535bb8 db34472

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 23, 2010

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 23, 2010

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Open [ 1 ]

Target: 2.1.4, 3.0 Alpha 1, 2.0.7 [ 10361, 10331, 10390 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 23, 2010

Commented by: @AlexPeshkoff

Issue appears to be critical, cause it can in rare cases make firebird terminate due to access violation.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 23, 2010

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.0 [ 10221 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 2, 2010

Modified by: @dyemanov

summary: BUGs[?] in sqz.cpp functions => Bugs in the internal record compression routines

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 23, 2010

Commented by: @ibprovider

Please, apply these changes to
- Compressor::unpack
- Compressor::makeDiff

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 14, 2010

Commented by: @AlexPeshkoff

Reopening for front- and backporting

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 14, 2010

Modified by: @AlexPeshkoff

status: Resolved [ 5 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 15, 2010

Modified by: @AlexPeshkoff

status: Reopened [ 4 ] => Reopened [ 4 ]

Target: 2.1.4, 3.0 Alpha 1, 2.0.7 [ 10361, 10331, 10390 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 15, 2010

Modified by: @AlexPeshkoff

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1.4 [ 10361 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.0.7 [ 10390 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2011

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 15, 2016

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 15, 2016

Commented by: @ibprovider

Pavel, I think, in general case, for similar code/problem need create the "unit tests" on C++.

Through isql/api, of course, internal code can not be verified.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 15, 2016

Commented by: @pavel-zotov

IMO, one need to add several new items into "QA Status" combo...

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 15, 2016

Commented by: @ibprovider

And subdir "firebird\trunc\tests" :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants