[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solution?



Hello!

    Here is a better description of the platform problem...

    DataInputStream.readUnsignedShort() is a java method that returns
an int.

    In /soot-1.beta.1/src/ca/mcgill/sable/soot/coffi/Classfile.java, the

return value is converted to a short. The java language spec states
(5.1.3)
that narrowing of basic types is not type safe.

    For example, in one case the returned value is 45???, which
converted to short gives -2???? (? means I dont remember the exact
value).

    There must be an underlying bug in the classfile reading logic, I
would be amazed that a class would have 45000 attributes.

    I have not invested too many time in this, maybe there is a simple
solution or even that this is but a effect of another cause...

    Any info welcome!

Charles Godin
(cgodin@discreet.com)
"Optimization hinders evolution."
    -- Alan J. Perlis, epigram in programming #21
    (Just had to quote that one ;))