Make sure shadow.closeWalker doesn't copy Mutexes
Make sure shadow.closeWalker doesn't copy Mutexes

The Close methods on shadow.Values require pointer receivers because
they contain a sync.Mutex, but that value was being copied through
Value.Interface by the closeWalker.  Because reflectwalk passes the
struct fields to the StructField method as they are defined in the
struct, and they may have been read as a value, we can't immediately
call Interface() to check the method set without possibly copying the
internal mutex values. Use the Implements method to first check if we
need to call Interface, and if it's not, then we can check if the value
is addressable.

Because of this use of reflection, we can't vet for the copying of these
locks. The minimal amount of code in the Close method left us only with
a race detected within the mutex itself, which leads to a stacktrace
pointing to the runtime rather than our code.

ewbankkit/terraform,VladRassokhin/terraform,brandontosch/terraform,randomvariable/terraform,tpounds/terraform,antonbabenko/terraform,iljaskevic/terraform,mafrosis/terraform,taliesins/terraform,kjmkznr/terraform,kwilczynski/terraform,sl1pm4t/terraform,pdecat/terraform,mattray/terraform,paultyng/terraform,lusis/terraform,mevansam/terraform,youhong316/terraform,nlamirault/terraform,markpeek/terraform,hashicorp/terraform,mtougeron/terraform,fatih/terraform,chrisjharding/terraform,justnom/terraform,mafrosis/terraform,apparentlymart/terraform,hooklift/terraform,catsby/terraform,drebes/terraform,kwilczynski/terraform,randomvariable/terraform,svanharmelen/terraform,HotelsDotCom/terraform,mattray/terraform,chrisjharding/terraform,grasshoppergroup/terraform,hooklift/terraform,luis-silva/terraform,heimweh/terraform,rnaveiras/terraform,apparentlymart/terraform,HotelsDotCom/terraform,pgray/terraform,dn1s/terraform,rkhozinov/terraform,taliesins/terraform,hooklift/terraform,ddegoede/terraform,hooklift/terraform,hartzell/terraform,kl4w/terraform,kl4w/terraform,brunomcustodio/terraform,dgolja/terraform,ColinHebert/terraform,kjmkznr/terraform,dgolja/terraform,mattray/terraform,fatih/terraform,iansheridan/terraform,catsby/terraform,svanharmelen/terraform,randomvariable/terraform,hartzell/terraform,maxenglander/terraform,VladRassokhin/terraform,tpounds/terraform,brunomcustodio/terraform,dgolja/terraform,VladRassokhin/terraform,pgray/terraform,HotelsDotCom/terraform,gechr/terraform,fatmcgav/terraform,asedge/terraform,lusis/terraform,mtougeron/terraform,Ticketmaster/terraform,dgolja/terraform,vancluever/terraform,ddegoede/terraform,brunomcustodio/terraform,ross/terraform,tombuildsstuff/terraform,rnaveiras/terraform,ewbankkit/terraform,yanndegat/terraform,fatmcgav/terraform,maxenglander/terraform,iansheridan/terraform,donaldguy/terraform,gechr/terraform,markpeek/terraform,lusis/terraform,pgray/terraform,huydinhle/terraform,GrayCoder/terraform,pryorda/terraform,kl4w/terraform,pradeepbhadani/terraform,rkhozinov/terraform,kjmkznr/terraform,mattray/terraform,maxenglander/terraform,svanharmelen/terraform,svanharmelen/terraform,kl4w/terraform,tommynsong/terraform,youhong316/terraform,Ticketmaster/terraform,VladRassokhin/terraform,iansheridan/terraform,hashicorp/terraform,sl1pm4t/terraform,ross/terraform,markpeek/terraform,grasshoppergroup/terraform,donaldguy/terraform,luis-silva/terraform,apparentlymart/terraform,ddegoede/terraform,grasshoppergroup/terraform,kjmkznr/terraform,dn1s/terraform,mafrosis/terraform,chrisjharding/terraform,golvteppe/terraform,rrudduck/terraform,justnom/terraform,HotelsDotCom/terraform,apparentlymart/terraform,brunomcustodio/terraform,Ticketmaster/terraform,gechr/terraform,heimweh/terraform,paultyng/terraform,ddegoede/terraform,pgray/terraform,pryorda/terraform,GrayCoder/terraform,randomvariable/terraform,antonbabenko/terraform,GrayCoder/terraform,drebes/terraform,brandontosch/terraform,golvteppe/terraform,taliesins/terraform,asedge/terraform,donaldguy/terraform,tommynsong/terraform,GrayCoder/terraform,hartzell/terraform,HotelsDotCom/terraform,maxenglander/terraform,asedge/terraform,vancluever/terraform,markpeek/terraform,mevansam/terraform,dn1s/terraform,mafrosis/terraform,tpounds/terraform,ddegoede/terraform,golvteppe/terraform,chrisjharding/terraform,tombuildsstuff/terraform,asedge/terraform,catsby/terraform,catsby/terraform,maxenglander/terraform,kwilczynski/terraform,yanndegat/terraform,iansheridan/terraform,fatmcgav/terraform,brandontosch/terraform,rnaveiras/terraform,drebes/terraform,luis-silva/terraform,ewbankkit/terraform,ColinHebert/terraform,rrudduck/terraform,luis-silva/terraform,vancluever/terraform,mtougeron/terraform,mtougeron/terraform,ross/terraform,Ticketmaster/terraform,tombuildsstuff/terraform,grasshoppergroup/terraform,pdecat/terraform,antonbabenko/terraform,paultyng/terraform,pdecat/terraform,sl1pm4t/terraform,yanndegat/terraform,taliesins/terraform,justnom/terraform,golvteppe/terraform,paultyng/terraform,mevansam/terraform,antonbabenko/terraform,tpounds/terraform,fatih/terraform,pradeepbhadani/terraform,fatih/terraform,pgray/terraform,yanndegat/terraform,kwilczynski/terraform,hashicorp/terraform,iljaskevic/terraform,brandontosch/terraform,vancluever/terraform,huydinhle/terraform,randomvariable/terraform,iljaskevic/terraform,drebes/terraform,donaldguy/terraform,nlamirault/terraform,huydinhle/terraform,chrisjharding/terraform,youhong316/terraform,fatih/terraform,dn1s/terraform,heimweh/terraform,antonbabenko/terraform,pradeepbhadani/terraform,tombuildsstuff/terraform,apparentlymart/terraform,iljaskevic/terraform,hartzell/terraform,rkhozinov/terraform,heimweh/terraform,heimweh/terraform,pdecat/terraform,huydinhle/terraform,golvteppe/terraform,sl1pm4t/terraform,pryorda/terraform,rrudduck/terraform,rkhozinov/terraform,lusis/terraform,rrudduck/terraform,tommynsong/terraform,ewbankkit/terraform,ross/terraform,fatmcgav/terraform,justnom/terraform,youhong316/terraform,GrayCoder/terraform,ColinHebert/terraform,mtougeron/terraform,nlamirault/terraform,ColinHebert/terraform,brandontosch/terraform,mevansam/terraform