8214816: os::read() should not transition to _thread_blocked with safepoint check on Solaris

Reviewed-by: jiangli, mgronlun
This commit is contained in:
David Holmes 2019-01-13 16:54:01 -05:00
parent 1c5496ac8b
commit c6653432a5
14 changed files with 24 additions and 96 deletions

View file

@ -3283,11 +3283,7 @@ jint Arguments::parse_vm_options_file(const char* file_name, ScopedVMInitArgs* v
memset(buf, 0, bytes_alloc);
// Fill buffer
// Use ::read() instead of os::read because os::read()
// might do a thread state transition
// and it is too early for that here
ssize_t bytes_read = ::read(fd, (void *)buf, (unsigned)bytes_alloc);
ssize_t bytes_read = os::read(fd, (void *)buf, (unsigned)bytes_alloc);
os::close(fd);
if (bytes_read < 0) {
FREE_C_HEAP_ARRAY(char, buf);