History

Fix boundschecking fork for macos/SELINUX

lib/bcheck.c: - Use INIT_SEM for child process fork on macos tests/tests2/Makefile: - tcc -run does not work for fork due to SHARED mmap

herman ten brugge committed 6 years ago

Commit d55e5861 parent 61c0c852 files · +5 −1Browse files

Unified · Split

2 files
  1. lib/bcheck.c +4 −1
  2. tests/tests2/Makefile +1 −0
lib/bcheck.c+4−1
@@ -1376,7 +1376,10 @@ pid_t fork(void) · 1375 unmodified lines
1376 1376
1377 WAIT_SEM();1377 WAIT_SEM();
1378 retval = (*fork_redir)();1378 retval = (*fork_redir)();
1379 POST_SEM();1379 if (retval == 0)
1380 INIT_SEM();
1381 else
1382 POST_SEM();
1380 return retval;1383 return retval;
1381}1384}
1382#endif1385#endif
tests/tests2/Makefile+1−0
@@ -94,6 +94,7 @@ GEN-ALWAYS = · 93 unmodified lines
94 ./a.exe94 ./a.exe
95 95
96114_bound_signal.test: FLAGS += -b96114_bound_signal.test: FLAGS += -b
97114_bound_signal.test: NORUN = true # tcc -run does not support fork and -b and SELINUX
97115_bound_setjmp.test: FLAGS += -b98115_bound_setjmp.test: FLAGS += -b
98116_bound_setjmp2.test: FLAGS += -b99116_bound_setjmp2.test: FLAGS += -b
99117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )100117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t