Skip to content
Snippets Groups Projects
  1. May 29, 2013
    • Nadav Har'El's avatar
      Don't abort on unknown sysconf. · 05c34106
      Nadav Har'El authored
      Don't abort on an unimplemented sysconf parameter. One of the documented
      functions of sysconf(3) is to "test ... whether certain options are
      supported", so programs are free to test for features we don't support
      yet, and we're supposed to return -1 with errno set to EINVAL.
      
      For example, Boost tested _SC_THREAD_SAFE_FUNCTIONS which we didn't
      support. It would have been fine if we set EINVAL (it would switch
      from *_r functions to the non-reenatrant ones) - but it wasn't fine
      that we abort()ed because of this test :-)
      
      To be on the safe side, this patch still prints a message if we see an
      unknown sysconf - in case in the future we'll come across a new one we
      must treat. But eventually, the message should go away too.
      05c34106
    • Nadav Har'El's avatar
      Implement _SC_THREAD_SAFE_FUNCTIONS sysconf · a25cb86b
      Nadav Har'El authored
      Implement the _SC_THREAD_SAFE_FUNCTIONS sysconf, returning 1.
      
      _SC_THREAD_SAFE_FUNCTIONS is defined in Posix 1003.1c ("posix threads"),
      and is supposed to return 1 if the thread-safe functions option is
      supported (*_r() functions). Since we do implement those, we should return
      1 for this sysconf.
      
      Boost's system library uses this sysconf, and if it sees it is not
      available, restorts to the _r()-less variants, for no good reason.
      a25cb86b
  2. May 27, 2013
    • Guy Zana's avatar
      debug: introduce debug_ll() and use it in abort() · 6ebb582e
      Guy Zana authored
      the debug() console function is taking a lock before it access the console driver,
      it does that by acquiring a mutex which may sleep.
      
      since we want to be able to debug (and abort) in contexts where it's not possible sleep,
      such as in page_fault, a lockless debug print method is introduced.
      
      previousely to this patch, any abort on page_fault would cause an "endless" recursive
      abort() loop which hanged the system in a peculiar state.
      6ebb582e
    • Guy Zana's avatar
      abort: debug() may cause an abort() as well · 9ef87755
      Guy Zana authored
      the current code handles the case of recursive aborts incorrectly, while
      the existing comment is very precise :)
      9ef87755
  3. May 22, 2013
    • Nadav Har'El's avatar
      Use osv::hang() in abort() · 17a79e66
      Nadav Har'El authored
      abort() did the same thing as the new osv::hang(), so let's just use
      osv::hang(). Note that it's important that osv::hang() doesn't print
      anything - abort() does, but avoids infinite recursion that can happen
      when abort()'s printing itself causes a crash, and another abort().
      17a79e66
  4. May 18, 2013
  5. May 02, 2013
  6. Apr 24, 2013
  7. Apr 23, 2013
    • Nadav Har'El's avatar
      Avoid recursive "Aborted" printout. · 17216873
      Nadav Har'El authored
      When memory is badly corrupted, our attempt to print "Aborted" in abort()
      can cause an endless recursion of abort()s, filling the stack and eventually
      (since we don't have a stack guard) everything. Let's just avoid printing
      the "Aborted" message if inside an abort().
      17216873
    • Avi Kivity's avatar
      libc: fix sysconf(_SC_NPROCESSORS_*) · 1733c8f1
      Avi Kivity authored
      The current implementation returns 1, leading the JRE to optimize for
      a uniprocessor host.  Unfortunately those optimizations are unsafe on SMP,
      leading to hangs.
      
      Fix by returning the real number of processors.
      1733c8f1
  8. Apr 11, 2013
  9. Apr 07, 2013
  10. Mar 18, 2013
  11. Feb 11, 2013
  12. Feb 07, 2013
  13. Feb 06, 2013
  14. Feb 05, 2013
  15. Jan 31, 2013
    • Avi Kivity's avatar
      runtime: implement __cxa_guard_acquire() · 4e7d8cce
      Avi Kivity authored
      Otherwise, static constructors in functions are never called.  This
      manifested itself in the jit generating wrong code when compiling a function,
      as the register calling convention was not initialized, and the jvm tried
      to load all method arguments into %rax.
      4e7d8cce
  16. Jan 27, 2013
  17. Jan 21, 2013
  18. Jan 20, 2013
  19. Jan 19, 2013
  20. Jan 18, 2013
  21. Jan 17, 2013
  22. Jan 16, 2013
    • Christoph Hellwig's avatar
      add the string library from musl · 5cd0168f
      Christoph Hellwig authored
      Import the whole string library, as well as the ctype functions from the musl
      C library.  Must is a BSD licensed library that aims to be API and mostly ABI
      compatible with glibc, so it's our easiest way to provide the ABI we need
      without reinventing the wheel.  I will import more of the traditional non-syscall
      C library code from it and expect libc/ to eventually mostly consist of slightly
      modified musl code.
      5cd0168f
  23. Jan 15, 2013
  24. Jan 11, 2013
  25. Jan 10, 2013
Loading