Skip to content

Commit e7e54fe

Browse files
committed
lib/libzstd: add an io compartmenet
This isn't a conventional IO interface, but rather some debugging code that is always compiled it. Compartmentalize it anyway to limit the blast radius of bugs elsewhere in the library.
1 parent 6c0765a commit e7e54fe

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/libzstd/Compartments.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compartments": {
3+
"io": {
4+
"files": [
5+
"cover.*o",
6+
"fastcover.*o",
7+
"zdict.*o"
8+
]
9+
}
10+
}
11+
}

lib/libzstd/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ LIBADD= pthread
4242
# explicitly disable assembly.
4343
CFLAGS+= -DZSTD_DISABLE_ASM
4444

45+
COMPARTMENT_POLICY= ${.CURDIR}/Compartments.json
46+
4547
PRIVATELIB= yes
4648
PACKAGE= runtime
4749

0 commit comments

Comments
 (0)