src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp

changeset 912
24fda36852ce
parent 907
7b920868b475
child 1014
0fbdb4381b99
child 1020
22e09c0f4b47
equal deleted inserted replaced
908:3ad2b8576c4a 912: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

mercurial