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

[leyden] Precompiler can cause Java code execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • repo-leyden
    • repo-leyden
    • hotspot

      In the AOT assembly phase, no Java code should be executed after we reset the internal states of important Java objects (TODO: refactor this code into a separate function)

      https://github.com/openjdk/leyden/blob/b5abb9d85cdc0a734865cfc38256d7c038465c8f/src/hotspot/share/cds/metaspaceShared.cpp#L1064-L1091

      However, the Precompiler runs after this:

      https://github.com/openjdk/leyden/blob/b5abb9d85cdc0a734865cfc38256d7c038465c8f/src/hotspot/share/cds/metaspaceShared.cpp#L1119

              Precompiler::compile_cached_code(&builder, CHECK);

      It may attempt to perform linking operations, which may cause Java code execution

            Unassigned Unassigned
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: