summary refs log tree commit diff
path: root/pkgs/development/perl-modules/dbix-class-fix-52leaks.patch
blob: 84af4a5acf1c81674d1da3fbcb2f7bd7805c1028 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From e9d552de92cde6552f35cd45a3572df1e25609cc Mon Sep 17 00:00:00 2001
From: Peter Rabbitson <ribasushi@cpan.org>
Date: Tue, 19 May 2015 05:49:48 +0200
Subject: [PATCH] Make sure tests pass without a compiler present (another step
 to RT#74706)

--- a/t/52leaks.t
+++ b/t/52leaks.t
@@ -446,6 +446,14 @@ for my $addr (keys %$weak_registry) {
     delete $weak_registry->{$addr}
       unless $cleared->{hash_merge_singleton}{$weak_registry->{$addr}{weakref}{behavior}}++;
   }
+  elsif ($names =~ /^B::Hooks::EndOfScope::PP::_TieHintHashFieldHash/m) {
+    # there is one tied lexical which stays alive until GC time
+    # https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/FieldHash.pm#L24
+    # simply ignore it here, instead of teaching the leaktracer to examine ties
+    # the latter is possible yet terrible: https://github.com/dbsrgits/dbix-class/blob/v0.082820/t/lib/DBICTest/Util/LeakTracer.pm#L113-L117
+    delete $weak_registry->{$addr}
+      unless $cleared->{bheos_pptiehinthashfieldhash}++;
+  }
   elsif ($names =~ /^DateTime::TimeZone::UTC/m) {
     # DT is going through a refactor it seems - let it leak zones for now
     delete $weak_registry->{$addr};