hotspot/src/os/windows/vm/os_windows.cpp
changeset 37113 5a33bf5089ac
parent 37052 e608476da586
child 37430 fd743dadef12
equal deleted inserted replaced
37111:98572401ab0a 37113:5a33bf5089ac
   640   if (thread_handle != NULL) {
   640   if (thread_handle != NULL) {
   641     log_info(os, thread)("Thread started (tid: %u, attributes: %s)",
   641     log_info(os, thread)("Thread started (tid: %u, attributes: %s)",
   642       thread_id, describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
   642       thread_id, describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
   643   } else {
   643   } else {
   644     log_warning(os, thread)("Failed to start thread - _beginthreadex failed (%s) for attributes: %s.",
   644     log_warning(os, thread)("Failed to start thread - _beginthreadex failed (%s) for attributes: %s.",
   645       strerror(errno), describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
   645       os::errno_name(errno), describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
   646   }
   646   }
   647 
   647 
   648   if (thread_handle == NULL) {
   648   if (thread_handle == NULL) {
   649     // Need to clean up stuff we've allocated so far
   649     // Need to clean up stuff we've allocated so far
   650     CloseHandle(osthread->interrupt_event());
   650     CloseHandle(osthread->interrupt_event());
  1896     return n;
  1896     return n;
  1897   }
  1897   }
  1898 
  1898 
  1899   if (errno != 0) {
  1899   if (errno != 0) {
  1900     // C runtime error that has no corresponding DOS error code
  1900     // C runtime error that has no corresponding DOS error code
  1901     const char* s = strerror(errno);
  1901     const char* s = os::strerror(errno);
  1902     size_t n = strlen(s);
  1902     size_t n = strlen(s);
  1903     if (n >= len) n = len - 1;
  1903     if (n >= len) n = len - 1;
  1904     strncpy(buf, s, n);
  1904     strncpy(buf, s, n);
  1905     buf[n] = '\0';
  1905     buf[n] = '\0';
  1906     return n;
  1906     return n;
  2439           if (PrintMiscellaneous && Verbose) {
  2439           if (PrintMiscellaneous && Verbose) {
  2440             char buf[256];
  2440             char buf[256];
  2441             jio_snprintf(buf, sizeof(buf), "Execution protection violation "
  2441             jio_snprintf(buf, sizeof(buf), "Execution protection violation "
  2442                          "at " INTPTR_FORMAT
  2442                          "at " INTPTR_FORMAT
  2443                          ", unguarding " INTPTR_FORMAT ": %s", addr,
  2443                          ", unguarding " INTPTR_FORMAT ": %s", addr,
  2444                          page_start, (res ? "success" : strerror(errno)));
  2444                          page_start, (res ? "success" : os::strerror(errno)));
  2445             tty->print_raw_cr(buf);
  2445             tty->print_raw_cr(buf);
  2446           }
  2446           }
  2447 
  2447 
  2448           // Set last_addr so if we fault again at the same address, we don't
  2448           // Set last_addr so if we fault again at the same address, we don't
  2449           // end up in an endless loop.
  2449           // end up in an endless loop.