comparison src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp @ 477:24fda36852ce

6727377: VM stack guard pages on Windows should PAGE_READWRITE not PAGE_EXECUTE_READWRITE Summary: Make reguard_stack change access to RW, not execute and use os::protect_memory with the new parameter when change needed to X. Reviewed-by: acorn, jcoomes
author coleenp
date Wed, 10 Dec 2008 15:14:29 -0800
parents 7b920868b475
children 0fbdb4381b99 22e09c0f4b47
comparison
equal deleted inserted replaced
473:3ad2b8576c4a 477:24fda36852ce
574 574
575 // In conservative mode, don't unguard unless the address is in the VM 575 // In conservative mode, don't unguard unless the address is in the VM
576 if (addr != last_addr && 576 if (addr != last_addr &&
577 (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) { 577 (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
578 578
579 // Unguard and retry 579 // Make memory rwx and retry
580 address page_start = 580 address page_start =
581 (address) align_size_down((intptr_t) addr, (intptr_t) page_size); 581 (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
582 bool res = os::unguard_memory((char*) page_start, page_size); 582 bool res = os::protect_memory((char*) page_start, page_size,
583 os::MEM_PROT_RWX);
583 584
584 if (PrintMiscellaneous && Verbose) { 585 if (PrintMiscellaneous && Verbose) {
585 char buf[256]; 586 char buf[256];
586 jio_snprintf(buf, sizeof(buf), "Execution protection violation " 587 jio_snprintf(buf, sizeof(buf), "Execution protection violation "
587 "at " INTPTR_FORMAT 588 "at " INTPTR_FORMAT