Commit 870c1cd
doc,test: mem protection must be observed in ffi
When using ffi.toBuffer, memory protection on any memory pages exposed
must be observed by the caller, otherwise crashes will occur.
Now documented, and tested.
PR-URL: #62818
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 2e612fe commit 870c1cdCopy full SHA for 870c1cd
4 files changed
+47-1Lines changed: 47 additions & 1 deletion
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- doc/api
- test/ffi
- fixture_library
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
539 | 539 | |
540 | 540 | |
541 | 541 | |
| 542 | + |
| 543 | + |
542 | 544 | |
543 | 545 | |
544 | 546 | |
|
Collapse file
test/ffi/ffi-test-common.js
Copy file name to clipboardExpand all lines: test/ffi/ffi-test-common.js+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
79 | 79 | |
80 | 80 | |
81 | 81 | |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
82 | 86 | |
83 | 87 | |
84 | 88 | |
|
Collapse file
test/ffi/fixture_library/ffi_test_library.c
Copy file name to clipboardExpand all lines: test/ffi/fixture_library/ffi_test_library.c+10-1Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | 5 | |
7 | 6 | |
8 | 7 | |
| 8 | + |
9 | 9 | |
10 | 10 | |
11 | 11 | |
| ||
378 | 378 | |
379 | 379 | |
380 | 380 | |
| 381 | + |
| 382 | + |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
Collapse file
test/ffi/test-ffi-readonly-write.js
Copy file name to clipboard+31Lines changed: 31 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 | + |
| 31 | + |
0 commit comments