Bug #8260

mdb: qlc module is using bogus test to verify the read of the read ql_hba structure

Added by Toomas Soome 11 months ago.

Status:NewStart date:2017-05-21
Priority:NormalDue date:
Assignee:-% Done:


Category:mdb - modular debugger
Target version:-
Difficulty:Medium Tags:needs-triage


mdb/common/modules/qlc/qlc.c is using the following construct:

        ql_head_t               ql_hba;

        if (mdb_readvar(&ql_hba, "ql_hba") == -1) {
                mdb_warn("failed to read ql_hba structure");
                return (DCMD_ERR);

        if (&ql_hba == NULL) {
                mdb_warn("failed to read ql_hba structure -- is qlc loaded?");
                return (DCMD_ERR);

However, since ql_hba is structure, the &ql_hba can not be NULL and therefore this test is quite meaningless. This construct can be found in few different functions in qlc.c.

Also available in: Atom