|Title||mps_arena_unsafe functions are bogus|
|Assigned user||Richard Brooksby|
|Description||The functions mps_arena_unsafe_expose_remember_protection  and mps_arena_unsafe_restore_protection  are kind of hairy (as well as having absurd names). It's not at all clear what the use case is for these.|
The function mps_arena_expose  "is expected only to be useful for debugging" so why have special unsafe functions that appear to be only for speeding it up?
|Analysis||The history of these functions seems to be as follows:|
1. Configura encountered an assertion failure when Office XP is installed (job000812).
2. They had trouble investigating this because of the MPS's memory protection (job000813).
3. mps_arena_expose was introduced to enable them to investigate the problem.
4. However, the performance was not acceptable (job000818).
5. The mps_arena_unsafe_* functions were introduced to improve the performance. Some bugs (job000825) were encountered and fixed.
6. Configura discovered the cause of the problem: an Office XP component was posting events, and their event handler was calling into the MPS directly (bypassing the MPS trampoline). The solution was for the event handler to call into the MPS via the trampoline. See analysis in job000812.
7. And now the MPS trampoline is unecessary (job003330).
So it looks as though all three functions could safely be removed.
For the moment I have marked all three functions as "deprecated starting with version 1.111". We can remove them in version 1.112 or some later version.
Note that the original assertion failure  was
MPS ASSERTION FAILURE: lock->claims == 0
and the "Common assertions and their causes" section of the manual gives the correct explanation : "The client program has made a re-entrant call into the MPS. Look at the backtrace to see what it was. Common culprits are signal handlers, ..."
|Created by||Gareth Rees|
|Created on||2012-10-24 15:29:33|
|Last modified by||Gareth Rees|
|Last modified on||2016-09-04 12:23:46|
|History||2012-10-24 GDR Created.|
2012-10-25 GDR Better analysis based on examination of issue database.
|180943||closed||2013-02-08 16:17:34||Richard Brooksby||Integrating branch/2012-10-09/user-guide back to master.|