On Wed, 12 Jun 2024 08:02:00 GMT, Matthias Baesken <[email protected]> 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.

This pull request has now been integrated.

Changeset: 57b64814
Author:    Matthias Baesken <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/57b6481449612529615484a313d8b85ccf23e287
Stats:     7 lines in 1 file changed: 4 ins; 0 del; 3 mod

8333277: ubsan: mlib_ImageScanPoly.c:292:43: runtime error: division by zero

Reviewed-by: prr

-------------

PR: https://git.openjdk.org/jdk/pull/19674

Reply via email to