8148696: Race loading hsdis may cause SIGSEGV

Guard library loading with a lock

Reviewed-by: vlivanov
This commit is contained in:
Nils Eliasson 2016-02-08 14:05:45 +01:00
parent eab1474601
commit 044e5ececc

View file

@ -85,6 +85,7 @@ class Disassembler {
public: public:
static bool can_decode() { static bool can_decode() {
ttyLocker tl;
return (_decode_instructions_virtual != NULL) || return (_decode_instructions_virtual != NULL) ||
(_decode_instructions != NULL) || (_decode_instructions != NULL) ||
load_library(); load_library();