summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24e7a5b)
raw | patch | inline | side by side (parent: 24e7a5b)
author | Sergey Vlasov <vsu@altlinux.ru> | |
Sun, 18 Jul 2010 12:17:49 +0000 (16:17 +0400) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Mon, 19 Jul 2010 06:31:04 +0000 (06:31 +0000) |
Apparently using the Storable module during global destruction is
unsafe - there is a bug which can cause segmentation faults:
http://rt.cpan.org/Public/Bug/Display.html?id=36087
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355
The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations. Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
unsafe - there is a bug which can cause segmentation faults:
http://rt.cpan.org/Public/Bug/Display.html?id=36087
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355
The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations. Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 19d6848d0e7754b9afb9fdbbac6fce31286468a5..c4163584a93ba594141aa8af99948fc8929605d7 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
LIST_CACHE => 'FAULT',
;
}
+
+ sub unmemoize_svn_mergeinfo_functions {
+ return if not $memoized;
+ $memoized = 0;
+
+ Memoize::unmemoize 'lookup_svn_merge';
+ Memoize::unmemoize 'check_cherry_pick';
+ Memoize::unmemoize 'has_no_changes';
+ }
+}
+
+END {
+ # Force cache writeout explicitly instead of waiting for
+ # global destruction to avoid segfault in Storable:
+ # http://rt.cpan.org/Public/Bug/Display.html?id=36087
+ unmemoize_svn_mergeinfo_functions();
}
sub parents_exclude {