1. 13 9月, 2018 1 次提交
    • R
      make arch __clone backends hidden · f5f7673d
      Rich Felker 提交于
      these are not a public interface and are not intended to be callable
      from anywhere but the public clone function or other places in libc.
      f5f7673d
  2. 26 4月, 2016 1 次提交
    • R
      fix thread structure/dtv-pointer corruption on powerpc · be999f7a
      Rich Felker 提交于
      per the powerpc psabi, offset 4 of the stack at call time belongs to
      the callee and is used for spilling lr (return address). in addition,
      offset 0 on the stack must contain a pointer to the previous stack
      frame, or a null pointer for the initial stack frame of a thread.
      __clone failed to setup any stack frame on the new thread's stack,
      thereby allowing the start function it called to clobber offset 4 of
      the new thread's struct __pthread, which contains the dtv pointer.
      
      add code to setup a proper stack frame and align the stack pointer to
      a multiple of 16 (also an abi requirement) if it was not already
      aligned.
      be999f7a
  3. 19 11月, 2012 2 次提交
    • R
      powerpc: handle syscall error in clone. · 3fae236e
      rofl0r 提交于
      sigsetjmp: store temporaries in jmp_buf rather than on stack.
      3fae236e
    • R
      fix powerpc asm not to store data in volatile space below stack pointer · 9565a349
      Rich Felker 提交于
      it's essential to decrement the stack pointer before writing to new
      stack space, rather than afterwards. otherwise there is a race
      condition during which asynchronous code (signals) could clobber the
      data being stored.
      
      it may be possible to optimize the code further using stwu, but I
      wanted to avoid making any changes to the actual stack layout in this
      commit. further improvements can be made separately if desired.
      9565a349
  4. 14 11月, 2012 1 次提交