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

ISQL crash when converted-from-double string longer than 23 bytes [CORE1363] #1781

Closed
firebird-automations opened this issue Jul 17, 2007 · 17 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Bill Oliver (verbguy)

Assigned to: Claudio Valderrama C. (robocop)

Is related to QA168

This has been around since dirt.

Try this in ISQL:

-- this did crash
select -2.488355210669293e+39 from rdb$database;

Output is this, followed by crash
> -- this did crash
> select -2.488355210669293e+39 from rdb$database;
> =======================
> -2488355210669293000000000000000000000000.000000

Dmitry said that the crash is ISQL-specific, it just doesn't expect a converted-from-double string to be longer than 23 bytes. Otherwise, the allocated buffer is trashed and the heap corruption happens.

Originally reported in CORE1362, Claudio asks this be entered as a separate ticket against ISQL.

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

It affects every isql known to me, from FB1 onwards. Probably all IB versions, too.

@firebird-automations
Copy link
Collaborator Author

Modified by: Claudio Valderrama C. (robocop)

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.0 [ 10091 ]

Version: 1.5.3 [ 10028 ]

Version: 1.5.2 [ 10027 ]

Version: 1.0.3 [ 10006 ]

Version: 2.0.4 [ 10211 ]

Version: 2.1.0 [ 10041 ]

Version: 3.0.0 [ 10048 ]

environment: Windows XP, Intel 32 => Windows XP, Intel 32
But the bug is platform independent.

@firebird-automations
Copy link
Collaborator Author

Modified by: Claudio Valderrama C. (robocop)

assignee: Claudio Valderrama C. [ robocop ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

This is another symptom:

SQL> select -2.488355210669293e-22 from rdb$database;

=======================
-0.000000

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0.0 [ 10048 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5 Alpha 1 [ 10224 ]

Fix Version: 3.0.0 [ 10048 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA168 [ QA168 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12600 ] => Firebird [ 14211 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Claudio, I just wanted to know if there will be a backport to 2.0 and 2.1

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

Is it important to backport here?
The bug has been in IB maybe since isql was created.
I could try to backport to v2.1 but I do not have a way to compile v2.0 thus I ignore it.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

no it's not important, we can let it
it was just to know for the Q/A testing

ok I close the bug

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

Philipp[e, I was just asking.
:-)

I compared the code between FB2.5 and FB2.1 and this area didn't change. Therefore, using the known, ancient technique of copy/paste I fixed v2.1's isql, but... how can I be sure it compiles in other platforms than Window?

@firebird-automations
Copy link
Collaborator Author

Commented by: Bill Oliver (verbguy)

Not a problem for 3.0, was fixed in 2.5.

@firebird-automations
Copy link
Collaborator Author

Modified by: Bill Oliver (verbguy)

Version: 3.0.0 [ 10048 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

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