Non-reentrant DLL problems

If you bind a DLL with the REUS(NONE) option, each load of the DLL causes a separate load of the code area and the data area (C_WSA). If you split a statically bound program into mutually dependent DLLs, you will probably not get the result that you want. Function pointers that used to compare the same may not be the same anymore, because the multiple loads of a DLL have more than one copy of the function in memory.

The same is true for data. A separate copy of C_WSA is loaded. So, data objects that are exported from a DLL and modified are not seen as modified by the new program that uses the DLL. You should bind all DLLs with REUS(RENT), or REUS(SERIAL) so that a new C_WSA is loaded only once per enclave.