Issue Details (XML | Word | Printable)

Key: CORE-1363
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Bill Oliver
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

ISQL crash when converted-from-double string longer than 23 bytes

Created: 17/Jul/07 09:29 AM   Updated: 15/Nov/09 04:06 PM
Component/s: ISQL
Affects Version/s: 1.0.3, 1.5.2, 1.5.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1.0, 2.0.4
Fix Version/s: 2.5 Alpha 1

Time Tracking:
Not Specified

Environment:
Windows XP, Intel 32
But the bug is platform independent.
Issue Links:
Relate
 


 Description  « Hide
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 CORE-1362, Claudio asks this be entered as a separate ticket against ISQL.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Claudio Valderrama C. added a comment - 12/Sep/07 10:49 PM
It affects every isql known to me, from FB1 onwards. Probably all IB versions, too.

Claudio Valderrama C. added a comment - 12/Sep/07 10:51 PM
This is another symptom:

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


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

Philippe Makowski added a comment - 10/Nov/09 07:33 PM
Claudio, I just wanted to know if there will be a backport to 2.0 and 2.1

Claudio Valderrama C. added a comment - 13/Nov/09 02:13 PM
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.

Philippe Makowski added a comment - 13/Nov/09 08:41 PM
no it's not important, we can let it
it was just to know for the Q/A testing

ok I close the bug

Claudio Valderrama C. added a comment - 14/Nov/09 07:15 AM
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?

Bill Oliver added a comment - 15/Nov/09 04:06 PM
Not a problem for 3.0, was fixed in 2.5.