Issue Details (XML | Word | Printable)

Key: CORE-1844
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Alexander Peshkov
Votes: 0
Watchers: 0
Operations

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

Valgrind often reports "Conditional jump or move depends on uninitialised value(s)" in check_status_vector()

Created: 17/Apr/08 08:48 AM   Updated: 18/Nov/08 12:37 PM
Component/s: None
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1 Beta 2, 2.1 RC1, 2.5 Initial, 2.1 RC2, 2.1.0, 2.0.4
Fix Version/s: 2.5 Alpha 1, 2.1.1, 2.0.5

Time Tracking:
Not Specified

Environment: 64 bit

Target: 2.5 Alpha 1, 2.1.1 and 2.0.5
Planning Status: Unspecified


 Description  « Hide
When executing CREATE DATABASE from isql, valgrind reports:
==10931== Conditional jump or move depends on uninitialised value(s)
==10931== at 0x4BC0413: check_status_vector(long const*) (why.cpp:5229)
==10931== by 0x4BC22BB: (anonymous namespace)::Status::~Status() (why.cpp:801)
==10931== by 0x4BC2297: (anonymous namespace)::YEntry::~YEntry() (why.cpp:941)
==10931== by 0x4BB75FA: isc_attach_database (why.cpp:1376)
==10931== by 0x4D85869: PREPARSE_execute(long*, unsigned*, unsigned*, unsigned short, char const*, bool*, unsigned short) (preparse.cpp:254)
==10931== by 0x4BBAD67: isc_dsql_exec_immed2_m (why.cpp:2841)
==10931== by 0x4BBAA36: isc_dsql_exec_immed2 (why.cpp:2725)
==10931== by 0x4BBA82F: isc_dsql_execute_immediate (why.cpp:2676)
==10931== by 0x413E26: create_db(char const*, char*) (isql.cpp:4572)
==10931== by 0x4154DB: frontend(char const*) (isql.cpp:5395)
==10931== by 0x416EC7: get_statement(char*, unsigned long, char const*) (isql.cpp:6228)
==10931== by 0x4146EA: do_isql() (isql.cpp:4841)


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 17/Apr/08 09:23 AM - edited
All error codes are defined as ISC_LONG
(32bit) in iberror.h. But they are stored in status vector, which is
ISC_STATUS (64 bit). Everything is not too bad as long as there is only one
error code in a vector - it's passed as first parameter in
ERR_post(ISC_STATUS, ...), and compiler knows it must convert it to 64-bit
value. But if some more error code is passed, it's passed as vararg,
therefore no conversion takes place. And 4 high bytes of ISC_STATUS contain
dirt (I've seen myself that it may be non-zero).

Datatypes should better match!