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

C1: possible overflow when strength reducing integer multiply by constant

    Details

    • Subcomponent:
    • Resolved In Build:
      b175
    • Verification:
      Verified

      Backports

        Description

        The tests I've seen fail are:

        TEST: java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
        TEST: java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
        TEST: java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
        TEST: java/util/concurrent/ConcurrentQueues/ConcurrentQueueLoops.java
        TEST: java/util/concurrent/Exchanger/ExchangeLoops.java
        TEST: java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
        TEST: java/util/concurrent/FutureTask/CancelledFutureLoops.java
        TEST: java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java
        TEST: java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java
        TEST: java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java
        TEST: java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java

        This bug is easily reproducible with:

        jtreg -verbose:all -noreport -jdk:$PWD/build/macosx-x86_64-normal-server-release/images/jdk -vmoptions:"-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler" jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (c1_LIRAssembler_x86.cpp:2032), pid=21760, tid=28419
        # Error: ShouldNotReachHere()
        #
        # JRE version: OpenJDK Runtime Environment (10.0) (build 10-internal+0-adhoc.cthalinger.hs)
        # Java VM: OpenJDK 64-Bit Server VM (10-internal+0-adhoc.cthalinger.hs, mixed mode, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, bsd-amd64)
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # An error report file with more information is saved as:
        # /Users/cthalinger/jdk10/hs/JTwork/scratch/hs_err_pid21760.log
        #
        # Compiler replay data is saved as:
        # /Users/cthalinger/jdk10/hs/JTwork/scratch/replay_pid21760.log
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        #

        --------------- T H R E A D ---------------

        Current thread (0x00007fcaf58e5800): JavaThread "C1 CompilerThread3" daemon [_thread_in_native, id=28419, stack(0x000070000ba8a000,0x000070000bb8a000)]


        Current CompileTask:
        C1: 128 274 3 LoopHelpers::compute2 (28 bytes)

        Stack: [0x000070000ba8a000,0x000070000bb8a000], sp=0x000070000bb88e90, free space=1019k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.dylib+0x6e665a] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x4ca
        V [libjvm.dylib+0x6e6cce] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x3c
        V [libjvm.dylib+0x26e1e6] report_vm_error(char const*, int, char const*, char const*, ...)+0xa2
        V [libjvm.dylib+0x17cec4] LIR_Assembler::arith_op(LIR_Code, LIR_OprDesc*, LIR_OprDesc*, LIR_OprDesc*, CodeEmitInfo*, bool)+0x1134
        V [libjvm.dylib+0x172f7f] LIR_Assembler::emit_op2(LIR_Op2*)+0x61
        V [libjvm.dylib+0x171ff3] LIR_Assembler::emit_lir_list(LIR_List*)+0x4b
        V [libjvm.dylib+0x17204f] LIR_Assembler::emit_code(BlockList*)+0x2b
        V [libjvm.dylib+0x153163] Compilation::emit_code_body()+0x127
        V [libjvm.dylib+0x153498] Compilation::compile_java_method()+0x10a
        V [libjvm.dylib+0x153647] Compilation::compile_method()+0x71
        V [libjvm.dylib+0x15383e] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, DirectiveSet*)+0x184
        V [libjvm.dylib+0x154c31] Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x61
        V [libjvm.dylib+0x2425fb] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x539
        V [libjvm.dylib+0x241ebf] CompileBroker::compiler_thread_loop()+0x1b3
        V [libjvm.dylib+0x6a6fe0] JavaThread::thread_main_inner()+0x82
        V [libjvm.dylib+0x6a6e53] JavaThread::run()+0x18b
        V [libjvm.dylib+0x5ae8ac] thread_native_entry(Thread*)+0x135
        C [libsystem_pthread.dylib+0x393b] _pthread_body+0xb4
        C [libsystem_pthread.dylib+0x3887] _pthread_body+0x0
        C [libsystem_pthread.dylib+0x308d] thread_start+0xd
        C 0x0000000000000000

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vlivanov Vladimir Ivanov
                  Reporter:
                  twisti Christian Thalinger
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: