project, migrate away from the use of blacklist and whitelist.
Please make sure your builder name and its builddir are unique through the
file.
- It is possible to whitelist email addresses to unconditionally receive
+ It is possible to allow email addresses to unconditionally receive
notifications on build failure; for this you'll need to add an
``InformativeMailNotifier`` to ``buildbot/osuosl/master/config/status.py``.
This is particularly useful for the staging buildmaster which is silent
// at '/path/to/lib'.
CompileLayer.add(JD, loadModule(...));
-Or, to expose a whitelisted set of symbols from the main process:
+Or, to expose a allowed set of symbols from the main process:
.. code-block:: c++
auto &JD = ES.createJITDylib("main");
- DenseSet<SymbolStringPtr> Whitelist({
+ DenseSet<SymbolStringPtr> AllowList({
Mangle("puts"),
Mangle("gets")
});
// Use GetForCurrentProcess with a predicate function that checks the
- // whitelist.
+ // allowed list.
JD.setGenerator(
DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL.getGlobalPrefix(),
- [&](const SymbolStringPtr &S) { return Whitelist.count(S); }));
+ [&](const SymbolStringPtr &S) { return AllowList.count(S); }));
// IR added to JD can now link against any symbols exported by the process
- // and contained in the whitelist.
+ // and contained in the list.
CompileLayer.add(JD, loadModule(...));
Future Features
policy. We must rely on the community to avoid pushing merge commits.
GitHub offers a feature called `Status Checks`: a branch protected by
-`status checks` requires commits to be whitelisted before the push can happen.
+`status checks` requires commits to be explicitly allowed before the push can happen.
We could supply a pre-push hook on the client side that would run and check the
-history, before whitelisting the commit being pushed [statuschecks]_.
+history, before allowing the commit being pushed [statuschecks]_.
However this solution would be somewhat fragile (how do you update a script
installed on every developer machine?) and prevents SVN access to the
repository.
Note that by default, this pass only runs for the "statepoint-example" or
"core-clr" gc strategies. You will need to add your custom strategy to this
-whitelist or use one of the predefined ones.
+list or use one of the predefined ones.
As an example, given this code:
int32_t mul(int32_t X, int32_t Y) { return X * Y; }
-int whitelistedSymbols(LLVMOrcSymbolStringPoolEntryRef Sym, void *Ctx) {
- assert(Ctx && "Cannot call whitelistedSymbols with a null context");
+int allowedSymbols(LLVMOrcSymbolStringPoolEntryRef Sym, void *Ctx) {
+ assert(Ctx && "Cannot call allowedSymbols with a null context");
- LLVMOrcSymbolStringPoolEntryRef *Whitelist =
+ LLVMOrcSymbolStringPoolEntryRef *AllowList =
(LLVMOrcSymbolStringPoolEntryRef *)Ctx;
- // If Sym appears in the whitelist then return true.
- LLVMOrcSymbolStringPoolEntryRef *P = Whitelist;
+ // If Sym appears in the allowed list then return true.
+ LLVMOrcSymbolStringPoolEntryRef *P = AllowList;
while (*P) {
if (Sym == *P)
return 1;
}
}
- // Build a filter to allow JIT'd code to only access whitelisted symbols.
+ // Build a filter to allow JIT'd code to only access allowed symbols.
// This filter is optional: If a null value is suppled for the Filter
// argument to LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess then
// all process symbols will be reflected.
- LLVMOrcSymbolStringPoolEntryRef Whitelist[] = {
+ LLVMOrcSymbolStringPoolEntryRef AllowList[] = {
LLVMOrcLLJITMangleAndIntern(J, "mul"),
LLVMOrcLLJITMangleAndIntern(J, "add"), 0};
LLVMErrorRef Err;
if ((Err = LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
&ProcessSymbolsGenerator, LLVMOrcLLJITGetGlobalPrefix(J),
- whitelistedSymbols, Whitelist))) {
+ allowedSymbols, AllowList))) {
MainResult = handleError(Err);
goto jit_cleanup;
}
jit_cleanup:
// Release all symbol string pool entries that we have allocated. In this
- // example that's just our whitelist entries.
+ // example that's just our allowed entries.
{
- LLVMOrcSymbolStringPoolEntryRef *P = Whitelist;
+ LLVMOrcSymbolStringPoolEntryRef *P = AllowList;
while (*P)
LLVMOrcReleaseSymbolStringPoolEntry(*P++);
}