Revision: 911 Author: tim.bunce Date: Mon Nov 16 03:47:10 2009 Log: Added workaround for RT#50851 "deflate failed, error -5 (buffer error)"
http://code.google.com/p/perl-devel-nytprof/source/detail?r=911 Modified: /trunk/Changes /trunk/NYTProf.xs /trunk/t/10-run.t ======================================= --- /trunk/Changes Sat Nov 14 14:49:13 2009 +++ /trunk/Changes Mon Nov 16 03:47:10 2009 @@ -13,6 +13,7 @@ XXX add "calls N subs" to treemap mouseover box XXX Should slowops that call other code appear in call tree? XXX test profiling code that has syntax errors +XXX profile with larger sizes of large_buffer (ie x10 small buffer) Note: The file format has changed. Old files can't be read. ======================================= --- /trunk/NYTProf.xs Mon Nov 16 02:48:55 2009 +++ /trunk/NYTProf.xs Mon Nov 16 03:47:10 2009 @@ -677,6 +677,11 @@ #endif status = deflate(&(ofile->zs), flush); + /* workaround for RT#50851 */ + if (status == Z_BUF_ERROR && flush != Z_NO_FLUSH + && !ofile->zs.avail_in && ofile->zs.avail_out) + status = Z_OK; + #ifdef DEBUG_DEFLATE fprintf(stderr, "flush_output postdef next_in= %p avail_in= %08x\n" " next_out=%p avail_out=%08x " ======================================= --- /trunk/t/10-run.t Sat Nov 14 15:59:54 2009 +++ /trunk/t/10-run.t Mon Nov 16 03:47:10 2009 @@ -2,12 +2,16 @@ use strict; use lib qw(t/lib); - use NYTProfTest; +# test run_test_group() with extra_test_code and profile_this() +# also regression test for deflate bug +# https://rt.cpan.org/Ticket/Display.html?id=50851 + use Devel::NYTProf::Run qw(profile_this); run_test_group( { + extra_options => { stmts => 0 }, # RT#50851 extra_test_count => 1, extra_test_code => sub { my ($profile, $env) = @_; -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
