1. 13 9月, 2018 22 次提交
  2. 06 9月, 2018 2 次提交
  3. 05 9月, 2018 6 次提交
  4. 03 9月, 2018 1 次提交
  5. 02 9月, 2018 1 次提交
  6. 01 9月, 2018 2 次提交
    • R
      always terminate by SIGABRT when abort is called · 9b14ad54
      Rich Felker 提交于
      Linux makes this surprisingly difficult, but it can be done. the trick
      here is using the fact that we control the implementation of sigaction
      to prevent changing the disposition of SIGABRT to anything but SIG_DFL
      after abort has tried and failed to terminate the process simply by
      calling raise(SIGABRT).
      9b14ad54
    • R
      optimize raise not to make a syscall for getting tid · 0b4c92b7
      Rich Felker 提交于
      assuming signals are blocked, which they are here, the tid in the
      thread structure is always valid and cannot change out from under us.
      0b4c92b7
  7. 30 8月, 2018 6 次提交
    • R
      prevent perror from clobbering stderr's orientation · cff4b910
      Rich Felker 提交于
      this requirement is specified by POSIX.
      cff4b910
    • R
      prevent psignal/psiginfo from clobbering stderr orientation, errno · cd8d8309
      Rich Felker 提交于
      these functions are specified to write to stderr but not set its
      orientation, presumably so that they can be used in programs operating
      stderr in wide mode. also, they are not allowed to clobber errno on
      success. save and restore to meet the requirement.
      
      psiginfo is reduced to a think wrapper around psignal, since it
      already behaved the same. if we want to add more detailed siginfo
      printing at some point this will need refactoring.
      cd8d8309
    • R
      make vfprintf set stream orientation even for zero-length output · a43a7b21
      Rich Felker 提交于
      if no output is produced, no underlying fwrite will ever be called,
      but byte-oriented printf functions are still required to set the
      orientation of the stream to byte-oriented. call __towrite explicitly
      if the FILE is not already in write mode.
      a43a7b21
    • R
      re-fix vfprintf temporary buffer logic · f1791f42
      Rich Felker 提交于
      commit b5a8b289 setup the write buffer
      bound pointers for the temporary buffer manually to fix a buffer
      overflow issue, but in doing so, caused vfprintf on unbuffered files
      never to call __towrite, thereby failing to set the stream orientation
      to byte-oriented, failing to clear any prior read mode, and failing to
      produce an error when the stream is not writable.
      
      revert the inline setup of the bounds pointers and instead zero them,
      so that the underlying fwrite code will call __towrite to set them up.
      f1791f42
    • R
      fix missing flush of stderr at exit if it was put in buffered mode · ddc947ed
      Rich Felker 提交于
      commit 0b80a7b0 added the ability to
      set application-provided stdio FILE buffers, adding the possibility
      that stderr might be buffered at exit time, but __stdio_exit did not
      have code to flush it.
      
      this regression was not present in any release.
      ddc947ed
    • R
      fix async thread cancellation on sh-fdpic · 35cd7c09
      Rich Felker 提交于
      if __cp_cancel was reached via __syscall_cp, r12 will necessarily
      still contain a GOT pointer (for libc.so or for the static-linked main
      program) valid for entering __cancel. however, in the case of async
      cancellation, r12 may contain any scratch value; it's not necessarily
      even a valid GOT pointer for the code that was interrupted.
      
      unlike in commit 0ec49dab where the
      corresponding issue was fixed for powerpc64, there is fundamentally no
      way for fdpic code to recompute its GOT pointer. so a new mechanism is
      introduced for cancel_handler to write a GOT register value into the
      interrupted context on archs where it is needed.
      35cd7c09