diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+### 2.0.32
+
++ Use haskell-gi 0.27.
+
 ### 2.0.31
 
 + Depend on haskell-gi >= 0.26.9 (see [issue 439](https://github.com/haskell-gi/haskell-gi/issues/439))
diff --git a/GObject.overrides b/GObject.overrides
--- a/GObject.overrides
+++ b/GObject.overrides
@@ -6,6 +6,16 @@
 # Requires support for non-GObject objects, which we do not support.
 ignore TypePluginClass
 
+# A GWeakRef is registered with the object it points to, so it
+# cannot be copied byte by byte, and it needs to be cleared with
+# g_weak_ref_clear() before its memory is released (otherwise the
+# object will write to freed memory when it is finalized). So do not
+# offer a zero-filled constructor, and treat WeakRefs as pointers to
+# memory that we do not own, which is what we did before the struct
+# got a known size when we started fixing struct layouts, see
+# https://github.com/haskell-gi/haskell-gi/issues/485.
+alloc-info WeakRef calloc=none copy=none free=none
+
 # Wrong introspection data.
 set-attr GObject/signal_emitv/@parameters/return_value caller-allocates 1
 set-attr GObject/signal_emitv/@parameters/return_value direction out
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # Documentation
 Autogenerated documentation for this package can be found at
 
-[https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject.html](https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject.html)
+[https://hackage.haskell.org/package/gi-gobject-2.0.32/docs/GI-GObject.html](https://hackage.haskell.org/package/gi-gobject-2.0.32/docs/GI-GObject.html)
 
 For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,17 +1,18 @@
 {-# LANGUAGE OverloadedStrings #-}
 
-import Data.GI.CodeGen.CabalHooks (setupBinding, TaggedOverride(..))
+import Data.GI.CodeGen.CabalHooks (setupBinding, TaggedOverride(..), TaggedPkgConfigVersions(..))
 
 import qualified GI.GLib.Config as GLib
 
 
 main :: IO ()
-main = setupBinding name version pkgName pkgVersion verbose overridesFile inheritedOverrides outputDir
+main = setupBinding name version pkgName pkgVersion verbose overridesFile inheritedOverrides depVersions outputDir
   where name = "GObject"
         version = "2.0"
         pkgName = "gi-gobject"
-        pkgVersion = "2.0.31"
+        pkgVersion = "2.0.32"
         overridesFile = Just "GObject.overrides"
         verbose = False
         outputDir = Nothing
         inheritedOverrides = [TaggedOverride "inherited:GLib" GLib.overrides]
+        depVersions = [TaggedPkgConfigVersions "GLib" GLib.pkgConfigVersions]
diff --git a/gi-gobject.cabal b/gi-gobject.cabal
--- a/gi-gobject.cabal
+++ b/gi-gobject.cabal
@@ -1,5 +1,5 @@
 name:                 gi-gobject
-version:              2.0.31
+version:              2.0.32
 synopsis:             GObject bindings
 description:          Bindings for GObject, autogenerated by haskell-gi.
 homepage:             https://github.com/haskell-gi/haskell-gi
@@ -16,7 +16,7 @@
 custom-setup
       setup-depends: base >= 4.11 && < 5,
                      Cabal >= 1.24 && < 4,
-                     haskell-gi >= 0.26.9 && < 0.27,
+                     haskell-gi >= 0.27 && < 0.28,
                      gi-glib == 2.0.*
 
 library
@@ -28,7 +28,7 @@
       pkgconfig-depends: gobject-2.0
       build-depends: base >= 4.7 && <5,
                      haskell-gi-base >= 0.26 && < 0.27,
-                     haskell-gi >= 0.26.9 && < 0.27,
+                     haskell-gi >= 0.27 && < 0.28,
                      haskell-gi-overloading < 1.1,
                      gi-glib == 2.0.*,
                      bytestring >= 0.10 && < 1,
