Commit 8eb18e4
child_process: measure buffer length in bytes
This change fixes a known issue where `maxBuffer` limits by characters
rather than bytes. Benchmark added to confirm no performance regression
occurs with this change.
PR-URL: #6764
Fixes: #1901
Reviewed-By: Brian White <mscdex@mscdex.net>1 parent 2a59e4e commit 8eb18e4Copy full SHA for 8eb18e4
File tree
Expand file treeCollapse file tree
5 files changed
+96
-41
lines changedOpen diff view settings
Filter options
- benchmark/child_process
- lib
- test/parallel
Expand file treeCollapse file tree
5 files changed
+96
-41
lines changedOpen diff view settings
Collapse file
benchmark/child_process/child-process-exec-stdout.js
Copy file name to clipboard+30Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
Collapse file
benchmark/child_process/child-process-read.js
Copy file name to clipboard+9-9Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | | - |
| 2 | + |
| 3 | + |
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | | - |
| 8 | + |
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
13 | | - |
| 12 | + |
| 13 | + |
14 | 14 | |
15 | | - |
16 | | - |
17 | | - |
| 15 | + |
| 16 | + |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | 20 | |
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
| 26 | + |
27 | 27 | |
28 | 28 | |
29 | 29 | |
Collapse file
+41-30Lines changed: 41 additions & 30 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
157 | 157 | |
158 | 158 | |
159 | 159 | |
160 | | - |
161 | | - |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
162 | 164 | |
163 | 165 | |
164 | | - |
165 | | - |
166 | 166 | |
167 | | - |
168 | | - |
169 | 167 | |
170 | 168 | |
171 | 169 | |
| ||
187 | 185 | |
188 | 186 | |
189 | 187 | |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | | - |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
200 | 205 | |
201 | 206 | |
202 | 207 | |
| ||
256 | 261 | |
257 | 262 | |
258 | 263 | |
259 | | - |
260 | | - |
| 264 | + |
261 | 265 | |
262 | 266 | |
263 | | - |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
264 | 274 | |
265 | 275 | |
266 | 276 | |
| 277 | + |
267 | 278 | |
268 | 279 | |
269 | | - |
270 | | - |
271 | | - |
272 | | - |
| 280 | + |
273 | 281 | |
274 | 282 | |
275 | 283 | |
276 | 284 | |
277 | 285 | |
278 | | - |
279 | | - |
| 286 | + |
280 | 287 | |
281 | 288 | |
282 | | - |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
283 | 296 | |
284 | 297 | |
285 | 298 | |
| 299 | + |
286 | 300 | |
287 | 301 | |
288 | | - |
289 | | - |
290 | | - |
291 | | - |
| 302 | + |
292 | 303 | |
293 | 304 | |
294 | 305 | |
|
Collapse file
test/parallel/test-child-process-maxBuffer-stderr.js
Copy file name to clipboard+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
Collapse file
…_issues/test-child-process-max-buffer.js …l/test-child-process-maxBuffer-stdout.jstest/known_issues/test-child-process-max-buffer.js renamed to test/parallel/test-child-process-maxBuffer-stdout.js test/known_issues/test-child-process-max-buffer.js renamed to test/parallel/test-child-process-maxBuffer-stdout.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-maxBuffer-stdout.js+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | 3 | |
5 | 4 | |
| ||
10 | 9 | |
11 | 10 | |
12 | 11 | |
13 | | - |
| 12 | + |
14 | 13 | |
15 | 14 | |
16 | 15 | |
0 commit comments