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

[s390x] Fix garbage value being passed in Argument Register

XMLWordPrintable

    • b18
    • s390x
    • linux

        In FFI implementation on s390x, there is a bug due to which when 32-bit integer is loaded then it contains garbage value in other half of 32-bits. Which results into Segmentation Fault while doing some operations.

        (gdb) i r r2
        r2 0x3ff00000019 4393751543833

        *3ff needs not be there.

        Error:
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x000003fefdeed1be, pid=827814, tid=827815
        #
        # JRE version: OpenJDK Runtime Environment (23.0) (fastdebug build 23-internal-adhoc.amit.jdk)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 23-internal-adhoc.amit.jdk, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-s390x)
        # Problematic frame:
        # C [libfontmanager.so+0xed1be] getHBScriptCode+0x26
        #
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/amit/daily_testing/jdk/core.827814)
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        # The crash happened outside the Java Virtual Machine in native code.
        # See problematic frame for where to report the bug.
        #


        Stack Trace:
        Stack: [0x000003ffa5880000,0x000003ffa5980000], sp=0x000003ffa597c700, free space=1009k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C [libfontmanager.so+0xed1be] getHBScriptCode+0x26 (scriptMapping.c:91)
        v ~RuntimeStub::nep_invoker_blob 0x000003ff9889f1ac
        J 3130 c1 java.lang.invoke.LambdaForm$MH+0x0000000031301000.invoke(Ljava/lang/Object;JFJJJIIIIIFFIIJJ)V java.base (49 bytes) @ 0x000003ff9194a89c [0x000003ff9194a440+0x000000000000045c]
        j java.lang.invoke.LambdaForm$MH+0x00000000312b7000.invokeExact_MT(Ljava/lang/Object;JFJJJIIIIIFFIIJJLjava/lang/Object;)V+49 java.base
        j jdk.internal.foreign.abi.DowncallStub+0x0000000031295400.invoke(Ljava/lang/foreign/SegmentAllocator;Ljava/lang/foreign/MemorySegment;FLjava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;IIIIIFFIILjava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;)V+369 java.base
        j java.lang.invoke.LambdaForm$DMH+0x0000000031295800.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;)V+42 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031300c00.invoke(Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;)V+82 java.base
        j java.lang.invoke.LambdaForm$MH+0x00000000312b6800.invokeExact_MT(Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+46 java.base
        j sun.font.HBShaper.lambda$shape$0(Ljava/awt/geom/Point2D$Float;[F[CFLjava/lang/foreign/MemorySegment;IIIIII)V+79 java.desktop
        J 3213 c1 sun.font.HBShaper$$Lambda+0x00000000312d3098.run()V java.desktop (48 bytes) @ 0x000003ff91935b88 [0x000003ff91935a40+0x0000000000000148]
        J 3212 c1 jdk.internal.vm.ScopedValueContainer.runWithoutScope(Ljava/lang/Runnable;)V java.base (105 bytes) @ 0x000003ff9191c2d4 [0x000003ff9191c1c0+0x0000000000000114]
        J 3208 c1 java.lang.ScopedValue$Carrier.run(Ljava/lang/Runnable;)V java.base (33 bytes) @ 0x000003ff9193c770 [0x000003ff9193c280+0x00000000000004f0]
        J 3200 c1 sun.font.HBShaper.shape(Lsun/font/Font2D;Lsun/font/FontStrike;F[FLjava/lang/foreign/MemorySegment;[CLsun/font/GlyphLayout$GVData;IIIILjava/awt/geom/Point2D$Float;II)V java.desktop (52 bytes) @ 0x000003ff91936c20 [0x000003ff91936500+0x0000000000000720]
        J 3197 c1 sun.font.SunLayoutEngine.layout(Lsun/font/FontStrikeDesc;[FFIILsun/font/TextRecord;ILjava/awt/geom/Point2D$Float;Lsun/font/GlyphLayout$GVData;)V java.desktop (141 bytes) @ 0x000003ff9192528c [0x000003ff91924f80+0x000000000000030c]
        J 3189 c1 sun.font.GlyphLayout$EngineRecord.layout()V java.desktop (108 bytes) @ 0x000003ff9191814c [0x000003ff91917f80+0x00000000000001cc]
        J 3114 c1 sun.font.GlyphLayout.layout(Ljava/awt/Font;Ljava/awt/font/FontRenderContext;[CIIILsun/font/StandardGlyphVector;)Lsun/font/StandardGlyphVector; java.desktop (683 bytes) @ 0x000003ff918f2120 [0x000003ff918f0640+0x0000000000001ae0]
        J 3235 c1 sun.font.ExtendedTextSourceLabel.createGV()Lsun/font/StandardGlyphVector; java.desktop (79 bytes) @ 0x000003ff9193108c [0x000003ff91930ec0+0x00000000000001cc]
        J 3163 c1 java.awt.font.TextLine.init()V java.desktop (1056 bytes) @ 0x000003ff9190aaf8 [0x000003ff91909c00+0x0000000000000ef8]
        J 3234 c1 java.awt.font.TextLine.<init>(Ljava/awt/font/FontRenderContext;[Lsun/font/TextLineComponent;[F[CII[I[BZ)V java.desktop (83 bytes) @ 0x000003ff9192cf2c [0x000003ff9192cc00+0x000000000000032c]
        J 3093 c1 java.awt.font.TextLine.fastCreateTextLine(Ljava/awt/font/FontRenderContext;[CLjava/awt/Font;Lsun/font/CoreMetrics;Ljava/util/Map;)Ljava/awt/font/TextLine; java.desktop (341 bytes) @ 0x000003ff918b3fd8 [0x000003ff918b3100+0x0000000000000ed8]
        J 3142 c1 java.awt.font.TextLayout.fastInit([CLjava/awt/Font;Ljava/util/Map;Ljava/awt/font/FontRenderContext;)V java.desktop (90 bytes) @ 0x000003ff918e7b44 [0x000003ff918e7840+0x0000000000000304]
        J 3140 c1 java.awt.font.TextLayout.<init>(Ljava/lang/String;Ljava/awt/Font;Ljava/awt/font/FontRenderContext;)V java.desktop (180 bytes) @ 0x000003ff918ea588 [0x000003ff918e9f00+0x0000000000000688]
        J 3138 c1 minimalTest.runTest(Ljava/lang/Object;Ljava/lang/Object;)V (26 bytes) @ 0x000003ff918e2b48 [0x000003ff918e29c0+0x0000000000000188]
        j minimalTest.main([Ljava/lang/String;)V+210
        j java.lang.invoke.LambdaForm$DMH+0x00000000310f0000.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031229000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031229400.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base
        j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base
        j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base
        j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base
        j com.sun.tools.javac.launcher.SourceLauncher.execute(Lcom/sun/tools/javac/launcher/MemoryContext;[Ljava/lang/String;)Ljava/lang/Class;+447 jdk.compiler
        j com.sun.tools.javac.launcher.SourceLauncher.run([Ljava/lang/String;[Ljava/lang/String;)Lcom/sun/tools/javac/launcher/Result;+62 jdk.compiler
        j com.sun.tools.javac.launcher.SourceLauncher.main([Ljava/lang/String;)V+17 jdk.compiler
        v ~StubRoutines::call_stub 0x000003ff983cfb1c
        V [libjvm.so+0xb1b51a] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x42a (javaCalls.cpp:415)
        V [libjvm.so+0xb1a0d2] JavaCalls::call(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x42 (javaCalls.cpp:329)
        V [libjvm.so+0xc551c2] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x222 (jni.cpp:888)
        V [libjvm.so+0xc5871a] jni_CallStaticVoidMethod+0x13a (jni.cpp:1717)
        C [libjli.so+0x3e5c] invokeStaticMainWithArgs+0x9c (java.c:418)
        C [libjli.so+0x4fe8] JavaMain+0xe28 (java.c:623)
        C [libjli.so+0x8100] ThreadJavaMain+0x20 (java_md.c:650)
        Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
        v ~RuntimeStub::nep_invoker_blob 0x000003ff9889f0d6
        J 3130 c1 java.lang.invoke.LambdaForm$MH+0x0000000031301000.invoke(Ljava/lang/Object;JFJJJIIIIIFFIIJJ)V java.base (49 bytes) @ 0x000003ff9194a89c [0x000003ff9194a440+0x000000000000045c]
        j java.lang.invoke.LambdaForm$MH+0x00000000312b7000.invokeExact_MT(Ljava/lang/Object;JFJJJIIIIIFFIIJJLjava/lang/Object;)V+49 java.base
        j jdk.internal.foreign.abi.DowncallStub+0x0000000031295400.invoke(Ljava/lang/foreign/SegmentAllocator;Ljava/lang/foreign/MemorySegment;FLjava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;IIIIIFFIILjava/lang/foreign/MemorySegment;Ljava/lang/foreign/MemorySegment;)V+369 java.base
        j java.lang.invoke.LambdaForm$DMH+0x0000000031295800.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;)V+42 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031300c00.invoke(Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;)V+82 java.base
        j java.lang.invoke.LambdaForm$MH+0x00000000312b6800.invokeExact_MT(Ljava/lang/Object;FLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIFFIILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V+46 java.base
        j sun.font.HBShaper.lambda$shape$0(Ljava/awt/geom/Point2D$Float;[F[CFLjava/lang/foreign/MemorySegment;IIIIII)V+79 java.desktop
        J 3213 c1 sun.font.HBShaper$$Lambda+0x00000000312d3098.run()V java.desktop (48 bytes) @ 0x000003ff91935b88 [0x000003ff91935a40+0x0000000000000148]
        J 3212 c1 jdk.internal.vm.ScopedValueContainer.runWithoutScope(Ljava/lang/Runnable;)V java.base (105 bytes) @ 0x000003ff9191c2d4 [0x000003ff9191c1c0+0x0000000000000114]
        J 3208 c1 java.lang.ScopedValue$Carrier.run(Ljava/lang/Runnable;)V java.base (33 bytes) @ 0x000003ff9193c770 [0x000003ff9193c280+0x00000000000004f0]
        J 3200 c1 sun.font.HBShaper.shape(Lsun/font/Font2D;Lsun/font/FontStrike;F[FLjava/lang/foreign/MemorySegment;[CLsun/font/GlyphLayout$GVData;IIIILjava/awt/geom/Point2D$Float;II)V java.desktop (52 bytes) @ 0x000003ff91936c20 [0x000003ff91936500+0x0000000000000720]
        J 3197 c1 sun.font.SunLayoutEngine.layout(Lsun/font/FontStrikeDesc;[FFIILsun/font/TextRecord;ILjava/awt/geom/Point2D$Float;Lsun/font/GlyphLayout$GVData;)V java.desktop (141 bytes) @ 0x000003ff9192528c [0x000003ff91924f80+0x000000000000030c]
        J 3189 c1 sun.font.GlyphLayout$EngineRecord.layout()V java.desktop (108 bytes) @ 0x000003ff9191814c [0x000003ff91917f80+0x00000000000001cc]
        J 3114 c1 sun.font.GlyphLayout.layout(Ljava/awt/Font;Ljava/awt/font/FontRenderContext;[CIIILsun/font/StandardGlyphVector;)Lsun/font/StandardGlyphVector; java.desktop (683 bytes) @ 0x000003ff918f2120 [0x000003ff918f0640+0x0000000000001ae0]
        J 3235 c1 sun.font.ExtendedTextSourceLabel.createGV()Lsun/font/StandardGlyphVector; java.desktop (79 bytes) @ 0x000003ff9193108c [0x000003ff91930ec0+0x00000000000001cc]
        J 3163 c1 java.awt.font.TextLine.init()V java.desktop (1056 bytes) @ 0x000003ff9190aaf8 [0x000003ff91909c00+0x0000000000000ef8]
        J 3234 c1 java.awt.font.TextLine.<init>(Ljava/awt/font/FontRenderContext;[Lsun/font/TextLineComponent;[F[CII[I[BZ)V java.desktop (83 bytes) @ 0x000003ff9192cf2c [0x000003ff9192cc00+0x000000000000032c]
        J 3093 c1 java.awt.font.TextLine.fastCreateTextLine(Ljava/awt/font/FontRenderContext;[CLjava/awt/Font;Lsun/font/CoreMetrics;Ljava/util/Map;)Ljava/awt/font/TextLine; java.desktop (341 bytes) @ 0x000003ff918b3fd8 [0x000003ff918b3100+0x0000000000000ed8]
        J 3142 c1 java.awt.font.TextLayout.fastInit([CLjava/awt/Font;Ljava/util/Map;Ljava/awt/font/FontRenderContext;)V java.desktop (90 bytes) @ 0x000003ff918e7b44 [0x000003ff918e7840+0x0000000000000304]
        J 3140 c1 java.awt.font.TextLayout.<init>(Ljava/lang/String;Ljava/awt/Font;Ljava/awt/font/FontRenderContext;)V java.desktop (180 bytes) @ 0x000003ff918ea588 [0x000003ff918e9f00+0x0000000000000688]
        J 3138 c1 minimalTest.runTest(Ljava/lang/Object;Ljava/lang/Object;)V (26 bytes) @ 0x000003ff918e2b48 [0x000003ff918e29c0+0x0000000000000188]
        j minimalTest.main([Ljava/lang/String;)V+210
        j java.lang.invoke.LambdaForm$DMH+0x00000000310f0000.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V+10 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031229000.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+33 java.base
        j java.lang.invoke.LambdaForm$MH+0x0000000031229400.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+20 java.base
        j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base
        j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base
        j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base
        j com.sun.tools.javac.launcher.SourceLauncher.execute(Lcom/sun/tools/javac/launcher/MemoryContext;[Ljava/lang/String;)Ljava/lang/Class;+447 jdk.compiler
        j com.sun.tools.javac.launcher.SourceLauncher.run([Ljava/lang/String;[Ljava/lang/String;)Lcom/sun/tools/javac/launcher/Result;+62 jdk.compiler
        j com.sun.tools.javac.launcher.SourceLauncher.main([Ljava/lang/String;)V+17 jdk.compiler
        v ~StubRoutines::call_stub 0x000003ff983cfb1c

              sjayagond Sidraya Jayagond
              amitkumar Amit Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: