hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
changeset 37430 fd743dadef12
parent 35201 996db89f378e
child 38133 78b95467b9f1
equal deleted inserted replaced
37428:6e724f3d488b 37430:fd743dadef12
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   467   if (sig == SIGPIPE || sig == SIGXFSZ) {
   467   if (sig == SIGPIPE || sig == SIGXFSZ) {
   468     // allow chained handler to go first
   468     // allow chained handler to go first
   469     if (os::Bsd::chained_handler(sig, info, ucVoid)) {
   469     if (os::Bsd::chained_handler(sig, info, ucVoid)) {
   470       return true;
   470       return true;
   471     } else {
   471     } else {
   472       if (PrintMiscellaneous && (WizardMode || Verbose)) {
   472       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
   473         char buf[64];
       
   474         warning("Ignoring %s - see bugs 4229104 or 646499219",
       
   475                 os::exception_name(sig, buf, sizeof(buf)));
       
   476       }
       
   477       return true;
   473       return true;
   478     }
   474     }
   479   }
   475   }
   480 
   476 
   481   JavaThread* thread = NULL;
   477   JavaThread* thread = NULL;
   726         address page_start =
   722         address page_start =
   727           (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
   723           (address) align_size_down((intptr_t) addr, (intptr_t) page_size);
   728         bool res = os::protect_memory((char*) page_start, page_size,
   724         bool res = os::protect_memory((char*) page_start, page_size,
   729                                       os::MEM_PROT_RWX);
   725                                       os::MEM_PROT_RWX);
   730 
   726 
   731         if (PrintMiscellaneous && Verbose) {
   727         log_debug(os)("Execution protection violation "
   732           char buf[256];
   728                       "at " INTPTR_FORMAT
   733           jio_snprintf(buf, sizeof(buf), "Execution protection violation "
   729                       ", unguarding " INTPTR_FORMAT ": %s, errno=%d", p2i(addr),
   734                        "at " INTPTR_FORMAT
   730                       p2i(page_start), (res ? "success" : "failed"), errno);
   735                        ", unguarding " INTPTR_FORMAT ": %s, errno=%d", addr,
       
   736                        page_start, (res ? "success" : "failed"), errno);
       
   737           tty->print_raw_cr(buf);
       
   738         }
       
   739         stub = pc;
   731         stub = pc;
   740 
   732 
   741         // Set last_addr so if we fault again at the same address, we don't end
   733         // Set last_addr so if we fault again at the same address, we don't end
   742         // up in an endless loop.
   734         // up in an endless loop.
   743         //
   735         //