Fixed a potential bug related to MIPS RIXI.

Sun, 12 Jun 2016 09:32:41 +0800

author
aoqi
date
Sun, 12 Jun 2016 09:32:41 +0800
changeset 19
675330130fb8
parent 18
c6d15c517c00
child 20
a4679fcd4713

Fixed a potential bug related to MIPS RIXI.
The Loongson new kernel supported MIPS RIXI. The code before this fix may
cause fault in the new kernel.

src/os_cpu/linux_mips/vm/os_linux_mips.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os_cpu/linux_mips/vm/os_linux_mips.cpp	Sun Jun 12 09:26:58 2016 +0800
     1.2 +++ b/src/os_cpu/linux_mips/vm/os_linux_mips.cpp	Sun Jun 12 09:32:41 2016 +0800
     1.3 @@ -503,9 +503,8 @@
     1.4          // Set memory to RWX and retry
     1.5          address page_start =
     1.6            (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
     1.7 -        //bool res = os::protect_memory((char*) page_start, page_size,
     1.8 -        //                              os::MEM_PROT_RWX);
     1.9 -        bool res = os::unguard_memory((char*) page_start, page_size);//aoqi:?
    1.10 +        bool res = os::protect_memory((char*) page_start, page_size,
    1.11 +                                      os::MEM_PROT_RWX);
    1.12  
    1.13          if (PrintMiscellaneous && Verbose) {
    1.14            char buf[256];

mercurial