Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348966 [ubsan] signed integer overflows in libawt java2d
  3. JDK-8330936

[ubsan] exclude function BilinearInterp and ShapeSINextSpan in libawt java2d from ubsan checks

XMLWordPrintable

    • 2d
    • b14
    • generic
    • generic

        When running the :tier4 of the jdk jtreg test (java/awt, javax/swing, sun/java2d ) with binaries compiled with -ftrapv
        to catch signed integer overflows, we get reproducibly those signed int overflow errors (similar to JDK-8330615) .

        java/awt/Paint/PgramUserBoundsTest.java

        # SIGILL (0x4) at pc=0x000000010930a686, pid=3989, tid=43267
        # Problematic frame:
        # C [libawt.dylib+0x51686] ShapeSINextSpan+0x616

        > C [libawt.so+0xd3e58] ShapeSINextSpan+0x568 (ShapeSpanIterator.c:1366)
        > C [libawt.so+0xd38b0] Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan+0x50 (ShapeSpanIterator.c:509)
        > j sun.java2d.pipe.ShapeSpanIterator.nextSpan([I)Z+0 java.desktop@23.0.0.1-internal

        and

        java/awt/Scrollbar/AquaLFScrollbarTest/ScrollBarBorderTest.java

        # SIGILL (0x4) at pc=0x000000010c98243d, pid=4021, tid=40963
        # Problematic frame:
        # C [libawt.dylib+0x5843d] BilinearInterp+0x17d

        > C [libawt.so+0xe3e97] BilinearInterp+0x787 (TransformHelper.c:683)
        > C [libawt.so+0xe6f84] Java_sun_java2d_loops_TransformHelper_Transform+0xe64 (TransformHelper.c:499)
        > j sun.java2d.loops.TransformHelper.Transform(Lsun/java2d/loops/MaskBlit;Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Ljava/awt/Composite;Lsun/java2d/pipe/Region;Ljava/awt/geom/AffineTransform;IIIIIIIII[III)V+0 java.desktop@23.0.0.1-internal


        Seems there is no change to this coding intended in the short term so I suggest to exclude the 2 functions from ubsan-checking .

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: