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

[lworld] Unsafe.makePrivateBuffer should return an Object

XMLWordPrintable

      Unsafe.makePrivateBuffer currently returns an inline type which allows flattening in containers and scalarization on the stack which in turn leads to loss of the larval bit and Unsafe.put* assert or potentially not having any effect. It should return an Object.

      We might also want to fail at checkcast when the larval bit is set (not sure though about the cost/benefit ratio, we could as well just treat it as user error).

      JDK-8239003 keeps track of the required C2 changes once this is in.

            fparain Frederic Parain
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: