nix-super/perl/lib/Nix
Eelco Dolstra 2d9bb56e55 Fix segfault on Darwin
Ever since SQLite in Nixpkgs was updated to 3.8.0.2, Nix has randomly
segfaulted on Darwin:

  http://hydra.nixos.org/build/6175515
  http://hydra.nixos.org/build/6611038

It turns out that this is because the binary cache substituter somehow
ends up loading two versions of SQLite: the one in Nixpkgs and the
other from /usr/lib/libsqlite3.dylib.  It's not exactly clear why the
latter is loaded, but it appears to be because WWW::Curl indirectly loads
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation,
which in turn seems to load /usr/lib/libsqlite3.dylib.  This leads to
a segfault when Perl exits:

  #0  0x00000001010375f4 in sqlite3_finalize ()
  #1  0x000000010125806e in sqlite_st_destroy ()
  #2  0x000000010124bc30 in XS_DBD__SQLite__st_DESTROY ()
  #3  0x00000001001c8155 in XS_DBI_dispatch ()
  ...
  #14 0x0000000100023224 in perl_destruct ()
  #15 0x0000000100000d6a in main ()
  ...

The workaround is to explicitly load DBD::SQLite before WWW::Curl.
2013-10-24 19:15:52 +02:00
..
Config.pm.in Pass configuration settings to the substituters 2012-07-30 16:09:54 -04:00
CopyClosure.pm Fixing the pv position regarding compression 2013-05-03 11:08:51 +02:00
GeneratePatches.pm * Install NixManifest.pm, NixConfig.pm and GeneratePatches.pm under 2011-10-10 21:11:08 +00:00
Manifest.pm Fix segfault on Darwin 2013-10-24 19:15:52 +02:00
SSH.pm build-remote.pl: Properly close the SSH connection between attempts 2013-05-10 02:38:50 +02:00
Store.pm Fix annoying Perl 5.16 warnings 2013-03-08 00:27:32 +01:00
Store.xs Don't apply the CPU affinity hack to nix-shell (and other Perl programs) 2013-09-06 16:36:56 +02:00
Utils.pm Give a better error message if writeFile fails due to permission issues 2012-12-20 12:22:13 +01:00