1. 31 Oct, 2013 1 commit
    • 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
  2. 30 Oct, 2013 6 commits
  3. 29 Oct, 2013 12 commits
  4. 28 Oct, 2013 2 commits
  5. 25 Oct, 2013 2 commits
  6. 24 Oct, 2013 3 commits
  7. 23 Oct, 2013 2 commits
  8. 22 Oct, 2013 6 commits
  9. 21 Oct, 2013 3 commits
  10. 20 Oct, 2013 1 commit
  11. 18 Oct, 2013 2 commits
    • Russ Cox's avatar
      cmd/cgo: fix line number in an error message · dbe2eacf
      Russ Cox authored
      Fixes #6563.
      
      R=golang-dev, iant
      CC=golang-dev
      https://golang.org/cl/14870046
      dbe2eacf
    • Russ Cox's avatar
      cmd/cgo: stop using compiler error message text to analyze C names · 06ad3b2d
      Russ Cox authored
      The old approach to determining whether "name" was a type, constant,
      or expression was to compile the C program
      
              name;
      
      and scan the errors and warnings generated by the compiler.
      This requires looking for specific substrings in the errors and warnings,
      which ties the implementation to specific compiler versions.
      As compilers change their errors or drop warnings, cgo breaks.
      This happens slowly but it does happen.
      Clang in particular (now required on OS X) has a significant churn rate.
      
      The new approach compiles a slightly more complex program
      that is either valid C or not valid C depending on what kind of
      thing "name" is. It uses only the presence or absence of an error
      message on a particular line, not the error text itself. The program is:
      
              // error if and only if name is undeclared
              void f1(void) { typeof(name) *x; }
      
              // error if and only if name is not a type
              void f2(void) { name *x; }
      
              // error if and only if name is not an integer constant
              void f3(void) { enum { x = (name)*1 }; }
      
      I had not been planning to do this until Go 1.3, because it is a
      non-trivial change, but it fixes a real Xcode 5 problem in Go 1.2,
      and the new code is easier to understand than the old code.
      It should be significantly more robust.
      
      Fixes #6596.
      Fixes #6612.
      
      R=golang-dev, r, james, iant
      CC=golang-dev
      https://golang.org/cl/15070043
      06ad3b2d