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

TestMD5Intrinsics and TestMD5MultiBlockIntrinsics don't test the intrinsics

XMLWordPrintable

    • b23

        Both TestMD5Intrinsics and TestMD5MultiBlockIntrinsics get the expected hash in the first iteration of computing MD5, and this iteration is run by the interpreter.

        The tests later run some warm-up iterations and get the hash for comparison. The hash is supposed to be obtained from the intrinsics. However, WARMUP_ITERATIONS is set to 1 in DigestSanityTestBase, and the hash is not obtained from the intrinsics.

        Reproduction:
        1. Introduce a bug in MacroAssembler::fast_md5 (x86)
        #define FF(r1, r2, r3, r4, k, s, t) \
          /*movl(rsi, r3); remove an instruction*/ \
          ...
        2. TestMD5Intrinsics still passes.
        3. Change WARMUP_ITERATIONS in DigestSanityTestBase to 600.
        4. TestMD5Intrinsics fails.

              yftsai Yi-Fan Tsai
              yftsai Yi-Fan Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: