smaller type conversion bugs on 32 bit
Bug #1087202 reported by
Vladislav Vaintroub
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Laurynas Biveinis | ||
5.1 |
Fix Released
|
Medium
|
Laurynas Biveinis | ||
5.5 |
Fix Released
|
Medium
|
Laurynas Biveinis | ||
5.6 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
There are couple of bugs about conversion of ib_uint64_t types (like LSNs) to size_t-big types. On 32 bit, for big enough values it would mean truncating valuable bits off the value. I used Visual Studio compiler to find the bugs, gcc by default is lax on type conversions, even ones that might result in loss of information.
Also, I found that ut_max inline function was sometimes incorrectly used on 64 bit values - it is defined for ulint values, which is != ib_uint64_t on 32 bit
Finally, there is a warning about truncation of ib_uint64_t to double, in I_S handling (because Field::
Related branches
lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.1
- Stewart Smith (community): Approve
- Laurynas Biveinis (community): Approve
- Sergei Glushchenko: Pending (g2) requested
-
Diff: 158 lines (+40/-16)6 files modifiedPercona-Server/storage/innodb_plugin/handler/i_s.cc (+2/-2)
Percona-Server/storage/innodb_plugin/include/ut0ut.h (+9/-0)
Percona-Server/storage/innodb_plugin/include/ut0ut.ic (+13/-0)
Percona-Server/storage/innodb_plugin/log/log0log.c (+2/-2)
Percona-Server/storage/innodb_plugin/log/log0online.c (+10/-10)
Percona-Server/storage/innodb_plugin/os/os0file.c (+4/-2)
lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.5
- Stewart Smith (community): Approve
- Sergei Glushchenko (community): Approve (g2)
-
Diff: 143 lines (+36/-12)6 files modifiedPercona-Server/storage/innobase/handler/i_s.cc (+2/-2)
Percona-Server/storage/innobase/include/ut0ut.h (+9/-0)
Percona-Server/storage/innobase/include/ut0ut.ic (+13/-0)
Percona-Server/storage/innobase/log/log0log.c (+2/-2)
Percona-Server/storage/innobase/log/log0online.c (+6/-6)
Percona-Server/storage/innobase/os/os0file.c (+4/-2)
tags: | added: contribution |
To post a comment you must log in.
Notes:
The warnings are found in XtraDB inside MariaDB, here is the listing
http:// buildbot. askmonty. org/buildbot/ builders/ win32-packages/ builds/ 733/steps/ build_zip/ logs/warnings% 20%2834% 29 .