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

Wrong access to SLONG data in dsql_nod. [CORE1501] #783

Closed
firebird-issue-importer opened this issue Oct 5, 2007 · 6 comments
Closed

Wrong access to SLONG data in dsql_nod. [CORE1501] #783

firebird-issue-importer opened this issue Oct 5, 2007 · 6 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Oct 5, 2007

Submitted by: @AlexPeshkoff

SLONG is stored in dsql_nod* (nod_arg[0]).
To put data in it,
nod_arg[0] = (dsql_nod*) (IPTR) number;
is used. I will not talk here about all casts, pure SLONG passes through to reach it's permanent location, it's not important here. But extraction is done in desc style. ie:
SLONG value = * (SLONG*) nod_arg;

This seems to be OK, and it's really OK for any 32-bit machine and for any little endian machine. On 64-bit big endian CPU 32-bit data is placed in one half of a 64-bit pointer, but taken from another one.

This ticket is only about dsql_nod, but there are may be more such places in the engine.

Commits: 543f986 e4271ba

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 17, 2007

Commented by: @AlexPeshkoff

Added new function
dsql_nod* MAKE_const_slong(SLONG)
and method
SLONG dsql_nod::getConstant()
to deal with stored in dsql_nod 32-bit constants in the same way everywhere.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 17, 2007

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.1 RC1 [ 10201 ]

Fix Version: 2.0.4 [ 10211 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 26, 2007

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

Workflow: jira [ 13252 ] => Firebird [ 13989 ]

@firebird-issue-importer
Copy link
Author

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

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 19, 2016

Modified by: @pavel-zotov

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

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment