Fix uaf in DestroyThread function. (dotnet/coreclr#15437)
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>
Fri, 8 Dec 2017 20:26:00 +0000 (23:26 +0300)
committerBrian Robbins <brianrob@microsoft.com>
Fri, 8 Dec 2017 20:25:59 +0000 (12:25 -0800)
commit848290b63a0990a4c250f6a82135a148f1ec9680
tree7c38c34fdeb067446b2c8bd7b3c003dcf14daade
parentfb5b776b26ec83c381c1e107e61df2338cb427c1
Fix uaf in DestroyThread function. (dotnet/coreclr#15437)

Mark thread's buffers as no longer owned before calling
Thread::OnThreadTerminate because thread can delete itself in
this method.

Commit migrated from https://github.com/dotnet/coreclr/commit/ddab65b2643ec2c3b7a376f4f44a05073124b732
src/coreclr/src/vm/threads.cpp