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-automations opened this issue Aug 23, 2010 · 16 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.0 [ 10221 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Reopening for front- and backporting

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

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

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Cannot be tested

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

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

@firebird-automations
Copy link
Collaborator Author

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