1.1 --- a/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Fri Jan 24 09:28:47 2014 +0100 1.2 +++ b/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Wed Mar 05 11:28:33 2014 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -475,9 +475,11 @@ 1.11 // here if the underlying file has been truncated. 1.12 // Do not crash the VM in such a case. 1.13 CodeBlob* cb = CodeCache::find_blob_unsafe(pc); 1.14 - nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; 1.15 - if (nm != NULL && nm->has_unsafe_access()) { 1.16 - stub = StubRoutines::handler_for_unsafe_access(); 1.17 + if (cb != NULL) { 1.18 + nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; 1.19 + if (nm != NULL && nm->has_unsafe_access()) { 1.20 + stub = StubRoutines::handler_for_unsafe_access(); 1.21 + } 1.22 } 1.23 } 1.24 else 1.25 @@ -724,6 +726,7 @@ 1.26 err.report_and_die(); 1.27 1.28 ShouldNotReachHere(); 1.29 + return false; 1.30 } 1.31 1.32 void os::print_context(outputStream *st, void *context) {