1. 15 Nov, 2013 1 commit
  2. 14 Nov, 2013 2 commits
  3. 13 Nov, 2013 7 commits
  4. 12 Nov, 2013 2 commits
  5. 11 Nov, 2013 2 commits
  6. 08 Nov, 2013 2 commits
  7. 07 Nov, 2013 1 commit
    • Russ Cox's avatar
      cmd/cgo: fix handling of array of pointers when using clang · 6be1cb8c
      Russ Cox authored
      Clang does not record the "size" field for pointer types,
      so we must insert the size ourselves. We were already
      doing this, but only for the case of pointer types.
      For an array of pointer types, the setting of the size for
      the nested pointer type was happening after the computation
      of the size of the array type, meaning that the array type
      was always computed as 0 bytes. Delay the size computation.
      
      This bug happens on all Clang systems, not just FreeBSD.
      Our test checked that cgo wrote something, not that it was correct.
      FreeBSD's default clang rejects array[0] as a C struct field,
      so it noticed the incorrect sizes. But the sizes were incorrect
      everywhere.
      
      Update testcdefs to check the output has the right semantics.
      
      Fixes #6292.
      
      R=golang-dev, iant
      CC=golang-dev
      https://golang.org/cl/22840043
      6be1cb8c
  8. 06 Nov, 2013 1 commit
  9. 05 Nov, 2013 3 commits
  10. 04 Nov, 2013 2 commits
  11. 01 Nov, 2013 2 commits
  12. 31 Oct, 2013 2 commits
    • Russ Cox's avatar
      cmd/5l, runtime: fix divide for profiling tracebacks on ARM · 2c98a3bc
      Russ Cox authored
      Two bugs:
      1. The first iteration of the traceback always uses LR when provided,
      which it is (only) during a profiling signal, but in fact LR is correct
      only if the stack frame has not been allocated yet. Otherwise an
      intervening call may have changed LR, and the saved copy in the stack
      frame should be used. Fix in traceback_arm.c.
      
      2. The division runtime call adds 8 bytes to the stack. In order to
      keep the traceback routines happy, it must copy the saved LR into
      the new 0(SP). Change
      
              SUB $8, SP
      
      into
      
              MOVW    0(SP), R11 // r11 is temporary, for use by linker
              MOVW.W  R11, -8(SP)
      
      to update SP and 0(SP) atomically, so that the traceback always
      sees a saved LR at 0(SP).
      
      Fixes #6681.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/19910044
      2c98a3bc
    • Russ Cox's avatar
      undo CL 19810043 / 352f3b7c9664 · b88148b9
      Russ Cox authored
      The CL causes misc/cgo/test to fail randomly.
      I suspect that the problem is the use of a division instruction
      in usleep, which can be called while trying to acquire an m
      and therefore cannot store the denominator in m.
      The solution to that would be to rewrite the code to use a
      magic multiply instead of a divide, but now we're getting
      pretty far off the original code.
      
      Go back to the original in preparation for a different,
      less efficient but simpler fix.
      
      ««« original CL description
      cmd/5l, runtime: make ARM integer division profiler-friendly
      
      The implementation of division constructed non-standard
      stack frames that could not be handled by the traceback
      routines.
      
      CL 13239052 left the frames non-standard but fixed them
      for the specific case of a divide-by-zero panic.
      A profiling signal can arrive at any time, so that fix
      is not sufficient.
      
      Change the division to store the extra argument in the M struct
      instead of in a new stack slot. That keeps the frames bog standard
      at all times.
      
      Also fix a related bug in the traceback code: when starting
      a traceback, the LR register should be ignored if the current
      function has already allocated its stack frame and saved the
      original LR on the stack. The stack copy should be used, as the
      LR register may have been modified.
      
      Combined, these make the torture test from issue 6681 pass.
      
      Fixes #6681.
      
      R=golang-dev, r, josharian
      CC=golang-dev
      https://golang.org/cl/19810043
      »»»
      
      TBR=r
      CC=golang-dev
      https://golang.org/cl/20350043
      b88148b9
  13. 30 Oct, 2013 6 commits
  14. 29 Oct, 2013 7 commits