hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
changeset 1664 fc9ed50498fb
parent 670 ddf3e9583f2f
child 2105 347008ce7984
equal deleted inserted replaced
1660:86be56b9ba46 1664:fc9ed50498fb
   420 
   420 
   421       // In conservative mode, don't unguard unless the address is in the VM
   421       // In conservative mode, don't unguard unless the address is in the VM
   422       if (addr != last_addr &&
   422       if (addr != last_addr &&
   423           (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
   423           (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
   424 
   424 
   425         // Unguard and retry
   425         // Set memory to RWX and retry
   426         address page_start =
   426         address page_start =
   427           (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
   427           (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
   428         bool res = os::unguard_memory((char*) page_start, page_size);
   428         bool res = os::protect_memory((char*) page_start, page_size,
       
   429                                       os::MEM_PROT_RWX);
   429 
   430 
   430         if (PrintMiscellaneous && Verbose) {
   431         if (PrintMiscellaneous && Verbose) {
   431           char buf[256];
   432           char buf[256];
   432           jio_snprintf(buf, sizeof(buf), "Execution protection violation "
   433           jio_snprintf(buf, sizeof(buf), "Execution protection violation "
   433                        "at " INTPTR_FORMAT
   434                        "at " INTPTR_FORMAT