JDK-5017808 : Memory allocation order change causes DLLs to load out of place.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-03-22
  • Updated: 2012-10-08
  • Resolved: 2004-04-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b45Fixed
Related Reports
Relates :  
Description
Changes on Windows platforms to allocate memory from high addresses down
allows the heap (and perhaps other structures) to occupy virtual addresses
which ought to be reserved for rebased DLLs.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b45 tiger-beta2
14-06-2004

SUGGESTED FIX ###@###.### 2004-03-22 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** c:/tmp/geta1472 Mon Mar 22 10:19:23 2004 --- os_win32_amd64.cpp Wed Mar 17 17:13:06 2004 *************** *** 18,24 **** char* os::reserve_memory(size_t bytes, char* addr) { assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE + MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE); assert(addr == NULL || addr == res, "Unexpected address from reserve."); return res; --- 18,24 ---- char* os::reserve_memory(size_t bytes, char* addr) { assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE, PAGE_EXECUTE_READWRITE); assert(addr == NULL || addr == res, "Unexpected address from reserve."); return res; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** c:/tmp/geta1140 Mon Mar 22 10:23:54 2004 --- os_win32_ia64.cpp Wed Mar 17 17:12:35 2004 *************** *** 18,24 **** char* os::reserve_memory(size_t bytes, char* addr) { assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE + MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE); assert(addr == NULL || addr == res, "Unexpected address from reserve."); return res; --- 18,24 ---- char* os::reserve_memory(size_t bytes, char* addr) { assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE, PAGE_EXECUTE_READWRITE); assert(addr == NULL || addr == res, "Unexpected address from reserve."); return res; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** c:/tmp/geta1040 Mon Mar 22 10:24:26 2004 --- os_win32_i486.cpp Wed Mar 17 17:12:02 2004 *************** *** 60,66 **** assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE + MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE); assert(res == NULL || addr == NULL || addr == res, "Unexpected address from reserve."); --- 60,66 ---- assert((size_t) addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size"); ! char* res = (char*) VirtualAlloc(addr, bytes, MEM_RESERVE, PAGE_EXECUTE_READWRITE); assert(res == NULL || addr == NULL || addr == res, "Unexpected address from reserve.");
11-06-2004

EVALUATION ###@###.### 2004-03-22 Minor problem, needs to be fixed.
22-03-2004