Skip to content
Implementation of the RLBox sandboxing API
C++ CMake C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake
code Fix unsigned long tainted_volatile test to run only on platforms wher… Jan 18, 2020
docs-src
docs fix readme + update docs Jan 11, 2020
examples/hello-world-noop fix readme + update docs Jan 11, 2020
.clang-format Macros should require semi colons Jul 20, 2019
.clang-tidy RLBOX_EMBEDDER_PROVIDES_TLS_STATIC_VARIABLES support via function Dec 16, 2019
.gitignore
.travis.yml
CMakeLists.txt Move timing test to separate binary so that we don't violate ODR Jan 18, 2020
Doxyfile.in Setup documentation with doxygen, sphinx and breathe Jul 20, 2019
LICENSE
README.md
iwyu.imp
leak_suppressions.txt
ub_suppressions.txt Enable ubsan in dev mode Jan 4, 2020

README.md

RLBox API

Build Status

RLBox sandboxing API (in C++ 17). See the online docs. This code has been tested on 64-bit versions of Ubuntu and Mac OSX.

Reporting security bugs

If you find a security bug, please do not create a public issue. Instead, file a security bug on bugzilla using the following template link.

Setup

Configure cmake to setup a build folder. This is needed to run tests or build the docs.

cmake -S . -B ./build

Running the tests

  1. Go through Setup listed above first

  2. To build and test:

cmake --build ./build --target check

Alternatively, you can run the build and test targets separately

cmake --build ./build --target all
cmake --build ./build --target test

Running the tests

Currently rlbox has been tested and should work with gcc-7 or later and clang-5 or later.

Using/Building docs

You can view the pre-built docs checked in to the repo in the docs folder. Alternatively, you can build these yourself with the steps listed below.

  1. Go through Setup listed above first

  2. You need to install doxygen and then the sphinx and breathe python packages (e.g., with pip3).

    On Ubuntu:

sudo apt install doxygen python-sphinx python-breathe

On Arch Linux:

sudo pacman -S doxygen python-sphinx python-breathe
  1. Build the docs:
cmake -S . -B ./build
cmake --build ./build --target docs
  1. Open the doc file in your favorite browser:
firefox `pwd`/docs/sphinx/index.html

Contributing Code/Docs

  1. To contribute code, it is recommended you install clang-tidy which the build uses if available. Install using:

    On Ubuntu:

sudo apt install clang-tidy

On Arch Linux:

sudo pacman -S clang-tidy
  1. It is recommended you use the dev mode for building during development. This treat warnings as errors, enables clang-tidy checks, runs address sanitizer etc. Also, you probably want to use the debug build. To do this, adjust your build settings as shown below
cmake -DCMAKE_BUILD_TYPE=Debug -DDEV=ON -S . -B ./build
  1. After making changes to the source, add any new required tests and run all tests as described earlier.

  2. Modify the docs as appropriate and rebuild docs as described earlier. Rebuilding is required if you have added new APIs.

  3. To make sure all code/docs are formatted with, we use clang-format. Install using:

    On Ubuntu:

sudo apt install clang-format

On Arch Linux:

sudo pacman -S clang-format
  1. Format code with the format-source target:
cmake --build ./build --target format-source
  1. Submit the pull request.
You can’t perform that action at this time.