Thread Perl Speicherprobleme mit großen Dateien (W32 Version) (31 answers)
Opened by Mapache at 2009-05-05 14:38

Mapache
 2009-05-06 08:57
#121267 #121267
User since
2009-05-05
8 Artikel
BenutzerIn

user image
Ach wie geil!

Danke Leute. Ich glaub ich hab's.
Ich habe folgende gemacht:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
    if ( $oc gt 10000 ) {
      print "Overflow detected at line $count:\n";   
      my @data_arr=unpack('C*', $data);
      my $data_hex;
      foreach my $c (@data_arr) 
      {
        $data_hex .= "\%" . sprintf ("%lx", $c);
      }
      print "$data_hex\n";
    }


So - und jetzt der Knaller. Raus kam das:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
1600000 lines done
1610000 lines done
1620000 lines done
1630000 lines done
1640000 lines done
1650000 lines done
1660000 lines done
1670000 lines done
1680000 lines done
1690000 lines done
Overflow detected at line 1695136:
%41%70%72%20%32%37%20%30%39%3a%30%38%3a%33%32%20%69%66%77%31%32%5f%65%6d%30%2e%6e%65%74%2e%69%6e%74%72%61%2e%62%68%66%2d%62%61%6e%6b%2e%63%6f%6d%20%61%75%64%69%74%64%3a%20%20%41%70%72%20%32%37%20%30%37%3a%30%38%3a%33%32%20%32%30%30%39%20%55%54%43%20%20%66%5f%68%74%74%70%5f%70%72%6f%78%79%20%61%5f%6c%69%62%70%72%6f%78%79%63%6f%6d%6d%6f%6e%20%74%5f%6e%65%74%74%72%61%66%66%69%63%20%70%5f%6d%61%6a%6f%72%20%70%69%64%3a%20%33%30%36%30%20%72%75%69%64%3a%20%30%20%65%75%69%64%3a%20%30%20%70%67%69%64%3a%20%33%30%36%30%20%6c%6f%67%69%64%3a%20%30%20%63%6d%64%3a%20%27%68%74%74%70%70%27%20%64%6f%6d%61%69%6e%3a%20%68%74%70%70%20%65%64%6f%6d%61%69%6e%3a%20%68%74%70%70%20%68%6f%73%74%6e%61%6d%65%3a%20%69%66%77%31%2e%6e%65%74%2e%69%6e%74%72%61%2e%62%68%66%2d%62%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Ein dicker Overflow.
Da sind wirklich lauter %00en in dem File. Daher lässt sich ein 9,5GB File - das ist es nämlich ursprünglich - in eine 50MB Datei zippen. Klar, wenn das ZIP-Tool da schöne %00en zippen darf. (Anmerkung: Das dürfte dann auch wunderbar zu benutzen sein, um Mailgateways aus dem Rennen zu nehmen. Man nehme eine 9,5 GB Datei mit %00en gezippt auf 50kb und schicke sie per Mail durchs Haus. Wenn der Mail-Virenscanner dann lustig beginnt auszupacken, isses aus. )

Der Knaller. Meine Beweisführung ist jetzt lückenlos.
Danke!!

View full thread Perl Speicherprobleme mit großen Dateien (W32 Version)