-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.zlibIssues and PRs related to the zlib subsystem.Issues and PRs related to the zlib subsystem.
Description
- Version: v15.6.0
- Platform: Linux ArchLaptop 5.10.9-arch1-1 deps: update openssl to 1.0.1j #1 SMP PREEMPT Tue, 19 Jan 2021 22:06:06 +0000 x86_64 GNU/Linux
- Subsystem: zlib
What steps will reproduce the bug?
The following code:
const {DeflateRaw} = require('zlib');
class MyStream extends DeflateRaw {
constructor(options) {
super(options);
}
write(chunk, enc, cb) {
console.log("Write: " + chunk + " " + enc + " " + cb);
}
}
console.log("Running");
const s = new MyStream();
s.end(Buffer.from('hello world'));
produces the following output on Node v15.6.0:
Running
On Node v15.5.0 and below, it produces the output:
Running
Write: hello world undefined undefined
How often does it reproduce? Is there a required condition?
This reproduces 100% of the time
What is the expected behavior?
Calling end
should call the overridden write
method with the supplied data, as in Node v15.5.0 and below.
What do you see instead?
The overridden write
method is not called.
Additional information
This leads to node-archiver producing invalid ZIP files: archiverjs/node-archiver#491
PR #36618 seems like it might be related
hatemalimam, xfournet, mcollina, pgrzesik, francoisfreitag and 7 more
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.zlibIssues and PRs related to the zlib subsystem.Issues and PRs related to the zlib subsystem.