From fa93b707932efe00ff382f92463f218a7de133d9 Mon Sep 17 00:00:00 2001 From: Jb Evain Date: Tue, 13 Oct 2020 14:12:08 -0700 Subject: [PATCH] Remove static field that introduces threading issues --- symbols/pdb/Microsoft.Cci.Pdb/PdbFile.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/symbols/pdb/Microsoft.Cci.Pdb/PdbFile.cs b/symbols/pdb/Microsoft.Cci.Pdb/PdbFile.cs index 35c0d3d67..b4d470505 100644 --- a/symbols/pdb/Microsoft.Cci.Pdb/PdbFile.cs +++ b/symbols/pdb/Microsoft.Cci.Pdb/PdbFile.cs @@ -142,11 +142,11 @@ static IntHashTable LoadNameStream(BitAccess bits) { return ht; } - private static PdbFunction match = new PdbFunction(); - private static int FindFunction(PdbFunction[] funcs, ushort sec, uint off) { - match.segment = sec; - match.address = off; + var match = new PdbFunction { + segment = sec, + address = off + }; return Array.BinarySearch(funcs, match, PdbFunction.byAddress); }