RFR: 8333277: ubsan: mlib_ImageScanPoly.c:292:43: runtime error: division by zero
Matthias Baesken
mbaesken at openjdk.org
Thu Jun 13 12:48:17 UTC 2024
On Wed, 12 Jun 2024 08:02:00 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> When running the jdk jtreg tests with ubsan enabled binaries on Linux x86_64, I get the warning below.
> This shows up in a couple of tests, for example
> java/awt/image/mlib/MlibOpsTest.jtr
> java/awt/image/Raster/TestChildRasterOp.jtr
>
> src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c:292:43: runtime error: division by zero
> #0 0x7fe6d958b862 in mlib_AffineEdges src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c:292
> #1 0x7fe6d958bb5d in mlib_ImageAffine_alltypes src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.c:179
> #2 0x7fe6d9e9b398 in Java_sun_awt_image_ImagingLib_transformBI src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c:922
> #3 0x7fe76f00ae7b (<unknown module>)
>
> The issue has been discussed with Phil Race (see https://bugs.openjdk.org/browse/JDK-8333277) and the division by zero has been already handled in the coding.
> However we can avoid it (and make ubsan happy) and in this case also do a few operations less.
Thanks for the review !
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19674#issuecomment-2165551184
More information about the client-libs-dev
mailing list