1.1 --- a/src/os/bsd/vm/os_bsd.cpp Thu Apr 04 21:15:43 2013 -0700 1.2 +++ b/src/os/bsd/vm/os_bsd.cpp Fri Apr 05 10:38:08 2013 -0700 1.3 @@ -152,7 +152,6 @@ 1.4 // utility functions 1.5 1.6 static int SR_initialize(); 1.7 -static int SR_finalize(); 1.8 1.9 julong os::available_memory() { 1.10 return Bsd::available_memory(); 1.11 @@ -1200,6 +1199,9 @@ 1.12 } else if (strchr(pname, *os::path_separator()) != NULL) { 1.13 int n; 1.14 char** pelements = split_path(pname, &n); 1.15 + if (pelements == NULL) { 1.16 + return false; 1.17 + } 1.18 for (int i = 0 ; i < n ; i++) { 1.19 // Really shouldn't be NULL, but check can't hurt 1.20 if (pelements[i] == NULL || strlen(pelements[i]) == 0) { 1.21 @@ -2766,10 +2768,6 @@ 1.22 return 0; 1.23 } 1.24 1.25 -static int SR_finalize() { 1.26 - return 0; 1.27 -} 1.28 - 1.29 1.30 // returns true on success and false on error - really an error is fatal 1.31 // but this seems the normal response to library errors 1.32 @@ -3578,16 +3576,6 @@ 1.33 //////////////////////////////////////////////////////////////////////////////// 1.34 // debug support 1.35 1.36 -static address same_page(address x, address y) { 1.37 - int page_bits = -os::vm_page_size(); 1.38 - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) 1.39 - return x; 1.40 - else if (x > y) 1.41 - return (address)(intptr_t(y) | ~page_bits) + 1; 1.42 - else 1.43 - return (address)(intptr_t(y) & page_bits); 1.44 -} 1.45 - 1.46 bool os::find(address addr, outputStream* st) { 1.47 Dl_info dlinfo; 1.48 memset(&dlinfo, 0, sizeof(dlinfo)); 1.49 @@ -3611,8 +3599,8 @@ 1.50 1.51 if (Verbose) { 1.52 // decode some bytes around the PC 1.53 - address begin = same_page(addr-40, addr); 1.54 - address end = same_page(addr+40, addr); 1.55 + address begin = clamp_address_in_page(addr-40, addr, os::vm_page_size()); 1.56 + address end = clamp_address_in_page(addr+40, addr, os::vm_page_size()); 1.57 address lowest = (address) dlinfo.dli_sname; 1.58 if (!lowest) lowest = (address) dlinfo.dli_fbase; 1.59 if (begin < lowest) begin = lowest;