Sunbug 6934356: Vector.writeObject() synchronization risks serialization deadlock

Peter Jones pcj at
Thu Jan 13 06:31:47 UTC 2011


Sorry for chiming in late here, but I was wondering-- has the performance impact of this change been measured?  Many years ago, the performance impact vs. the apparent severity of the bug at the time held back this fix (using PutField).  Of course, both sides of that consideration may have changed since then.

FWIW, the code change looks correct to me.  A style nit: I would drop the "= null" initializer on line 1060-- it is a value that should never be read, so let the compiler enforce that (and then you could declare "data" final as well).

-- Peter

P.S.  There is a serialization micro-benchmark framework under test/java/rmi/reliability/benchmark

On Jan 12, 2011, at 5:42 AM, Neil Richards wrote:

> On 10 January 2011 21:11, Alan Bateman <Alan.Bateman at> wrote:
>> The update to the javadoc looks fine to me. On the headers then we use the
>> GPL header on tests (no Classpath Exception).
> Sorry once again - please find attached with the corrected header for
> GPL (without Classpath exception).
> I hope I'm pretty much there now - let me know if you spot anything else.
> Cheers,
> Neil
> --
> Unless stated above:
> IBM email: neil_richards at
> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> <>

More information about the core-libs-dev mailing list