Ticket 49780 - acl_copyEval_context double free
Bug: There is a connection an operation extension to keep evaluation
results cached across multiple operations.
In the geteffective for each evaluation a sepatate temporary connection
extension is created and freed. If there are several concurrent operations
in one connection the operation extension destructor can try to access
an already freed connection extension.
Fix: Do not free the connectcion extension during the life time of a
connection. If a temporary extension should be used, lock the connection extension,
copy the content to a saved structure and copy the temporary data to the
connection extension. When done with the temporary extension reverse this.
To make this work the locks need to be directly created, the use of the limited
preallocated array of locks could lead to a situation where both the main and
the temporary extension would get the sam elock assigned.
Reviewed by: Thierry and Mark, Thanks