Commit 25c76a15 by Morgan Deters Committed by Tom Tromey

re PR libgcj/23353 (clone() copies internal lock data with hash synchronization off)

2005-08-12  Morgan Deters  <mdeters@morgandeters.com>

	PR libgcj/23353:
	* java/lang/natObject.cc (clone): Clear sync_info.

From-SVN: r103039
parent 2693c0b0
2005-08-12 Morgan Deters <mdeters@morgandeters.com>
PR libgcj/23353:
* java/lang/natObject.cc (clone): Clear sync_info.
2005-07-26 Tom Tromey <tromey@redhat.com>
* gnu/java/net/protocol/ftp/package.html,
......
// natObject.cc - Implementation of the Object class.
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation
This file is part of libgcj.
......@@ -104,6 +104,11 @@ java::lang::Object::clone (void)
}
memcpy ((void *) r, (void *) this, size);
#ifndef JV_HASH_SYNCHRONIZATION
// Guarantee that the locks associated to the two objects are
// distinct.
r->sync_info = NULL;
#endif
return r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment