1. 25 Apr, 2013 5 commits
    • Brad Fitzpatrick's avatar
      database/sql: fix driver Conn refcounting with prepared statements · 277047f5
      Brad Fitzpatrick authored
      The refcounting of driver Conns was completedly busted and
      would leak (be held open forever) with any reasonable
      load. This was a significant regression from Go 1.0.
      
      The core of this patch is removing one line:
      
           s.db.addDep(dc, s)
      
      A database conn (dc) is a resource that be re-created any time
      (but cached for speed) should not be held open forever with a
      dependency refcount just because the Stmt (s) is alive (which
      typically last for long periods of time, like forever).
      
      The meat of the patch is new tests. In fixing the real issue,
      a lot of tests then failed due to the fakedb_test.go's paranoia
      about closing a fakeConn while it has open fakeStmts on it. I
      could've ignored that, but that's been a problem in the past for
      other bugs.
      
      Instead, I now track per-Conn open statements and close them
      when the the conn closes.  The proper way to do this would've
      been making *driverStmt a finalCloser and using the dep mechanism,
      but it was much more invasive. Added a TODO instead.
      
      I'd like to give a way for drivers to opt-out of caring about
      driver.Stmt closes before a driver.Conn close, but that's a TODO
      for the future, and that TODO is added in this CL.
      
      I know this is very late for Go 1.1, but database/sql is
      currently nearly useless without this.
      
      I'd like to believe all these database/sql bugs in the past
      release cycle are the result of increased usage, number of
      drivers, and good feedback from increasingly-capable Go
      developers, and not the result of me sucking.  It's also hard
      with all the real drivers being out-of-tree, so I'm having to
      add more and more hooks to fakedb_test.go to simulate things
      which real drivers end up doing.
      
      Fixes #5323
      
      R=golang-dev, snaury, gwenn.kahz, google, r
      CC=golang-dev
      https://golang.org/cl/8836045
      277047f5
    • Jan Ziak's avatar
      cmd/gc: initialize t->width in dgcsym() if required · 13cbf41a
      Jan Ziak authored
      Update #5291.
      
      R=golang-dev, daniel.morsing, iant, r
      CC=golang-dev
      https://golang.org/cl/8663052
      13cbf41a
    • Jan Ziak's avatar
      undo CL 8954044 / ad3c2ffb16d7 · db1c218d
      Jan Ziak authored
      It works on i386, but fails on amd64 and arm.
      
      ««« original CL description
      runtime: prevent the GC from seeing the content of a frame in runfinq()
      
      Fixes #5348.
      
      R=golang-dev, dvyukov
      CC=golang-dev
      https://golang.org/cl/8954044
      »»»
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/8695051
      db1c218d
    • Jan Ziak's avatar
      runtime: prevent the GC from seeing the content of a frame in runfinq() · e9bbe3a8
      Jan Ziak authored
      Fixes #5348.
      
      R=golang-dev, dvyukov
      CC=golang-dev
      https://golang.org/cl/8954044
      e9bbe3a8
    • Mikio Hara's avatar
      net: deflake raw IP protocol entry test on Windows · 2bd17bca
      Mikio Hara authored
      Update #5344
      
      R=golang-dev, dave, r, alex.brainman
      CC=golang-dev
      https://golang.org/cl/8934043
      2bd17bca
  2. 24 Apr, 2013 2 commits
  3. 23 Apr, 2013 8 commits
  4. 22 Apr, 2013 6 commits
  5. 21 Apr, 2013 4 commits
  6. 20 Apr, 2013 2 commits
  7. 19 Apr, 2013 5 commits
  8. 18 Apr, 2013 7 commits
  9. 17 Apr, 2013 1 commit