I would like to open source a large code base and won't realistically be able to vet all the source manually before doing so.
It seems MS redact some text from comments in the source code they released for .NET BCL.
Here's an example from System.Lazy<T>
:
if (boxed == null ||
Interlocked.CompareExchange(ref m_boxed, boxed, null) != null)
{
// If CreateValue returns null, it means another thread successfully invoked the value factory
// and stored the result, so we should just take what was stored. If CreateValue returns non-null
// but we lose the ---- to store the single value, again we should just take what was stored.
boxed = (Boxed)m_boxed;
}
Note the ----
text. It seems the word race
may have been removed.
I've seem many other examples of this throughout their code.
How were these redactions calculated? Is it simple string matching?