Download the source code of Chromium

1
fetch chromium

Build dependencies

1
sudo src/build/install-build-deps.sh

Patch and compile

1
2
3
4
5
6
cd src
git reset --hard +hash
gclient sync
git apply < "path/to/a.diff"
gn gen out/asan_debug --args="is_debug=true is_component_build=true is_asan=true"
autoninja -C out/asan_debug chrome

Set ASAN_OPTIONS

1
export ASAN_OPTIONS=detect_odr_violation=0

Start Chromium

1
./out/asan_debug/chrome