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

Several problems with TestDwarf.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      ./test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java has supporting native code in libTestDwarf.c and libTestDwarfHelper.h.

      There are several problems with this native code.

      dereference_null() in libTestDwarfHelper.h contains a store to a null pointer. (So poorly named, since it's not a dereference at all.) The compiler can easily detect this undefined behavior. clang optimizes the assignment away. This results in the test failing for clang/linux, because the expected crash didn't occur.

      There are several divisions by zero in libTestDwarf.c. The compiler can easily detect this undefined behavior.

      There is a helper function, foo, in libTestDwarf.c. There are comments suggesting it needs to be not inlined, and it is made "big enough ... that it is not inlined". But that's hardly reliable.

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: