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

NPG: Crash after redefining java.lang.Object

XMLWordPrintable

    • 8
    • b91
    • x86
    • linux

        I'm seeing a crash when using java.lang.instrument to (dummy) redefine java.lang.Object and later call clone(). Triggering a Full GC provokes this problem much quicker.

        I have attached a small reproducer (Agent.java) - an instrumentation agent that redefines java.lang.Object without actually modifying the byte code. It then calls clone in a tight loop together with System.gc() to do some Full GCs.

        Reproduce like so:

        1. javac Agent.java
        2. jar cmf MANIFEST.MF agent.jar Agent.class
        3. java -javaagent:agent.jar Agent
        4. Wait a millisecond or two

        I can *not* reproduce on older releases, nor with 7u12-b05 so it's likely that this is a newly introduced regression in jdk8.

          1. Agent.java
            1 kB
          2. MANIFEST.MF
            0.0 kB

              coleenp Coleen Phillimore
              mikael Mikael Vidstedt
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: