Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8066239 Fuzzing bug umbrella CR for issues reported by André Bargull
  3. JDK-8066236

Fuzzing bug: StackMapTable error: bad offset, ClassFormatError

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u60
    • core-libs
    • None
    • b43
    • generic
    • generic

        Happens in all instances below

        jjs> Function("L:with(Object in Object)break L;\n{}")()
        Exception in thread "main" java.lang.ClassFormatError: Invalid pc in LineNumberTable in class file jdk/nashorn/internal/scripts/Script$Recompilation$6$1$\^function\_
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
           at jdk.nashorn.internal.runtime.ScriptLoader.installClass(ScriptLoader.java:74)
           at jdk.nashorn.internal.runtime.Context$ContextCodeInstaller.install(Context.java:183)
           at jdk.nashorn.internal.codegen.CompilationPhase$14.transform(CompilationPhase.java:556)
           at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:728)
           at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:620)
           at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.compileTypeSpecialization(RecompilableScriptFunctionData.java:513)
           at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.getBest(RecompilableScriptFunctionData.java:730)
           ...


        jjs> function f() { L: {this = x;break L}} f()
        Exception in thread "main" java.lang.VerifyError: StackMapTable error: bad offset
        Exception Details:
         Location:
        jdk/nashorn/internal/scripts/Script$Recompilation$4$1$\^shell\_.f(Ljdk/nashorn/internal/runtime/ScriptFunction;Ljava/lang/Object;)Ljava/lang/Object; @0: aload_0
         Reason:
           Invalid stackmap specification.
         Current Frame:
           bci: @21
           flags: { }
           locals: { 'jdk/nashorn/internal/runtime/ScriptFunction', 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptObject' }
           stack: { }
         Bytecode:
           0x0000000: 2ab6 0014 4d2b 2cba 0020 0000 1222 b800
           0x0000010: 2857 a700 03
         Stackmap Table:
           append_frame(@21,Object[#48])


        jjs> function f(){ L:with(this--)break L; } f()
        Exception in thread "main" java.lang.VerifyError: StackMapTable error: bad offset
        Exception Details:
         Location:
        jdk/nashorn/internal/scripts/Script$Recompilation$4$\^shell\_.f(Ljava/lang/Object;)Ljava/lang/Object; @0: aload_0
         Reason:
           Invalid stackmap specification.
         Current Frame:
           bci: @13
           flags: { }
           locals: { 'java/lang/Object' }
           stack: { }
         Bytecode:
           0x0000000: 2a01 1210 b800 16b8 001c a700 03
         Stackmap Table:
           same_frame(@13)


        jjs> function f(){ L:with(Object in Object) break L; } f()
        Exception in thread "main" java.lang.VerifyError: StackMapTable error: bad offset
        Exception Details:
         Location:
        jdk/nashorn/internal/scripts/Script$Recompilation$4$\^shell\_.f(Ljdk/nashorn/internal/runtime/ScriptFunction;Ljava/lang/Object;)Ljava/lang/Object; @0: aload_0
         Reason:
           Invalid stackmap specification.
         Current Frame:
           bci: @42
           flags: { }
           locals: { 'jdk/nashorn/internal/runtime/ScriptFunction', 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptObject' }
           stack: { }
         Bytecode:
           0x0000000: 2ab6 0014 4d2c 2cba 0020 0000 2cba 0020
           0x0000010: 0000 b800 26b8 002c b800 304d 2cb6 0035
           0x0000020: 4da7 0009 2cb6 0035 4dbf
         Exception Handler Table:
           bci [28, 36] => handler: 36
         Stackmap Table:
        full_frame(@36,{Object[#16],Object[#61],Object[#50]},{Object[#63]})
           same_frame(@42)

              attila Attila Szegedi
              lagergren Marcus Lagergren
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: