Created attachment 14063 [details]
Minimal test. The name is not meaningful
While debugging something unrelated, I found that if I cause two threads to terminate with thrown exceptions at about the same time, I see a single message printed twice:
"you are registering twice the same counter address"
This is a g_warning in mono-counters.c.
To reproduce, I have attached a file "SignalTest.cs". I do not see the message every time, but if I run the test repeatedly I see it within a few iterations. I run it repeatedly with
while (mono SignalTest.exe; true); do :; done
If I modify mono-counters.c to print the name of the counter, I find the counter names are:
RGCTX template num allocted
RGCTX template bytes allocted
and, on VERY rare occasions:
RGCTX num lazy fetch trampolines
RGCTX unmanaged lookups
Expected behavior: I think g_warnings should not be triggered by anything that user code could reasonably do, and the included code is reasonable.
Fixed in master.