Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 9d45b945f790
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: ef945219090d
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 21, 2013

  1. zlib: fix assert on bad input

    The following test case occasionally triggered an assert because
    write_in_progress_ didn't get cleared on error:
    
      $ cat test.js
      require('zlib').gunzip('BAM', console.log);
      setTimeout(gc, 10);
    
      $ while true; do node --expose-gc test.js || break; done
      { [Error: incorrect header check] errno: -3, code: 'Z_DATA_ERROR' }
      Assertion failed: (!write_in_progress_ && "write in progress"),
      function Clear, file ../src/node_zlib.cc, line 71.
      Abort trap: 6
    
    Steps to avoid that:
    
    * Initialize all primitive member fields in the constructor.
    * Clear the write_in_progress_ member field in ZCtx::Error().
    * Ref the ZCtx object as soon as write_in_progress_ is set to true.
      Before this commit, it could get GC'ed in the time between setting
      the field and the call to ctx->Ref().
    
    Fixes #4783.
    bnoordhuis committed Feb 21, 2013
    Copy the full SHA
    ef94521 View commit details
    Browse the repository at this point in the history