Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8341924

Improve error message with structurally malformed Code array

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • tools
    • None
    • b20

      While trying to replicate JDK-8179439, I noticed that the error message simply becomes "error at or after byte 0" when the ClassFile API cannot iterate the instructions due to malformed structures, such as bad low value in a tableswitch instruction, while a bad bci offset (no structural corruption) has a better error message.

      CodeWriter.writeInstrs should not swallow the IAE caught, but should report the IAE's message to be more informative to users in such cases.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: