Actions
Bug #10335
closedmdb: fix fpcw2str()
Start date:
2019-02-01
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
The fpcw2str() implementation (both in usr/src/cmd/mdb/intel/mdb/proc_amd64dep.c and in usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c) have multiple problems:
- FPPC, FPRC and FPIC macro constants should be used as bitfield masks, meaningless to print those out because the masked bits aren't simple yes-no values
- To decode precision, rounding and infinity options, cw should be masked with the corresponding bit-mask first, then use equality check instead of bitwise &.
This bug found during the review of #10132: smatch fixes for MDB.
Updated by Electric Monk about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 40 to 100
git commit 31779036e45a28bb1be446d3d65113584ccb7989
commit 31779036e45a28bb1be446d3d65113584ccb7989 Author: Doma Gergő Mihály <domag02@google.com> Date: 2019-05-21T12:36:53.000Z 10335 mdb: fix fpcw2str() Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gwr@nexenta.com>
Actions