Make sure the map is cleared before processing a new module. Similar to what is done on StackMaps.
This issue is similar to D38588, though this time for FaultMaps (on x86) rather than ARM/AArch64. Other than possible mixing of information between modules, the crash is caused by the pointers values in the map that was allocated by the bump pointer allocator that is unwinded when emitting the next file. This issue has been around since 3.8 though only the recent experience with D38588 helped me finding the fix....
This issue is likely much harder to write a test for since AFAICT it requires emitting something much more compilcated (and possibly real code) instead of just some random bytes....
Does it make sense to do these things in doFinalization?