[Lsb-infrastructure] [Bug 1929] New: Two different fields used for enum values

bugzilla-daemon at linux-foundation.org bugzilla-daemon at linux-foundation.org
Thu Feb 7 09:22:52 PST 2008


http://bugs.linuxbase.org/show_bug.cgi?id=1929

           Summary: Two different fields used for enum values
           Product: Infrastructure
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Database
        AssignedTo: khoroshilov at ispras.ru
        ReportedBy: mats at freestandards.org
         QAContact: lsb-infrastructure at freestandards.org


We just ran across a problem (bug 1928) where the old libtodb had made an
error. However, the error reminds me of a confusing inconsistency that would be
nice to clear up.  There are two fields in TypeMember:

TMarray - Stores the fixed value of enumerator. This field also used to store
array bounds, but it is now deprecated

TMvalue - Value for enumeration constants.

Apparently in this case, libtodb had filled in TMarray but not TMvalue. The
data had a discontinuity, values 0-16, then 32-46.  The result was that the
header information (.defs file) that is used for the specification had the
correct values but the build-time header (.h file) did not.  Seems like this is
kind of a dangerous situation; in fact the spec had been visually scanned in
this area and looked okay (which it was).

We should find a way to eliminate this disconnect.

Also note that libtodb generates no code to check enum values, so we did not
catch the problem in the .h file there, either.


-- 
Configure bugmail: http://bugs.linuxbase.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the lsb-infrastructure mailing list