Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18cd002

Browse filesBrowse files
thangktrantargos
authored andcommitted
test: change buffer offset to accommodate V8 BackingStore
To avoid problem with the behavior of new V8 BackingStore API, change the offset. The base address of each test case will be different. Fixes: #31061 PR-URL: #31171 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 20a8175 commit 18cd002
Copy full SHA for 18cd002

File tree

Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed
Open diff view settings
Filter options
  • test/addons/buffer-free-callback
Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed
Open diff view settings
Collapse file

‎test/addons/buffer-free-callback/test.js‎

Copy file name to clipboardExpand all lines: test/addons/buffer-free-callback/test.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,24 @@ function check(size, alignment, offset) {
1616
global.gc();
1717
}
1818

19+
// NOTE: If adding more check() test cases,
20+
// be sure to not duplicate alignment/offset.
21+
// Refs: https://github.com/nodejs/node/issues/31061#issuecomment-568612283
22+
1923
check(64, 1, 0);
2024

2125
// Buffers can have weird sizes.
22-
check(97, 1, 0);
26+
check(97, 1, 1);
2327

2428
// Buffers can be unaligned
2529
check(64, 8, 0);
2630
check(64, 16, 0);
2731
check(64, 8, 1);
2832
check(64, 16, 1);
29-
check(97, 8, 1);
30-
check(97, 16, 1);
3133
check(97, 8, 3);
3234
check(97, 16, 3);
35+
check(97, 8, 5);
36+
check(97, 16, 5);
3337

3438
// Empty ArrayBuffer does not allocate data, worth checking
35-
check(0, 1, 0);
39+
check(0, 1, 2);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.