So they create a global mutex using the GUID of their .NET assembly, right?
The code involved is something like this:
string.Format("Global\{0}", (object) Assembly.GetExecutingAssembly().GetType().GUID);
The .GetType() part isn't supposed to be there.
That gets the type of the assembly, not the assembly itself.
And that type is System.Reflection.RuntimeAssembly, part of .NET itself.
And they're using the same one!
Well, it turns out we can tell EXACTLY how that happened.
Because the answer is... STACK OVERFLOW
Twelve minutes later, "Cerebrus" answered. And that answer was wrong.
Three years later, Cerebrus returns and fixes the answer. They can't delete it, because it was accepted
reddit.com/r/docker/comme…
stackoverflow.com/a/502323
Think about how you'd find this bug in your own programs.
You copy/paste the code, it seems to work, and you don't realize it's broken because you don't run either of these programs which made the same mistake.
How could you change your development processes to detect this kind of error prior to shipping it?
But this one is from 2003!
pcreview.co.uk/threads/assemb…
I didn't mean to suggest this was a bug that was STILL HAPPENING, although at the time I didn't have confirmation that it was fixed. I didn't make that very clear, though! Sorry about that.
github.com/docker/for-win…
Well, I don't have one, but feel free to send me a dollar or two on Ko-Fi if you enjoyed this thread and would like me to keep doing this sort of thing:
ko-fi.com/fooneturing
(So then it'll be fixed on both ends, preventing either from having errors if a 3rd program does this)
