Open ChrisJefferson opened 9 years ago
The underlying problem is that DeclareGlobalVariable(xyz)
puts an immutable positional object in variable xyz
. However, an immutable positional object need not have immutable state. And the HPC-GAP version of DEEP_COPY_OBJ()
tries to make a copy of everything where the state isn't shared (e.g. atomic records) or immutable so as to avoid a thread suddenly and unexpectedly trying to read or modify an object that belongs to a different thread; it would still result in an error, but it could cause bugs.
What we probably need in the long term is both an in-region deep copy and a cross-region deep copy.
In GAP, we get:
Whereas in HPC-GAP this returns
false
.There doesn't seem to be a good reason to make a new object -- in this case the original and new objects are put in the same region.
I tried diving into the code to find out how to stop this happening, but couldn't easily figure out how to change it.