Commit Graph

59 Commits

Author SHA1 Message Date
sudden6
8bf37994fd
chore: add manual trigger to fuzzing builds 2022-02-13 16:01:57 +01:00
sudden6
6400b13754
chore: add continous fuzzing to our CI 2022-02-12 20:19:09 +01:00
Robin Linden
dd19856a6c
chore: Set up an Android CI job 2022-02-10 23:31:09 +01:00
jfreegman
6dc1656e28
Silence clang compile warnings causing circle-ci/asan to fail 2022-02-10 14:11:58 -05:00
Maxim Biro
e58ee06492
Fix Coverty scan 2022-02-10 10:11:22 -05:00
iphydf
5a3a0b6453
cleanup: Add nonnull annotations to function definitions.
These help static analysis and ubsan. We should eventually have all
functions annotated like this with a cimple check to make sure every
pointer has an explicit nullability annotation. The `nullable`
annotation does nothing in GCC, but will be used by cimple to validate
that every parameter has defined nullability.
2022-02-08 17:57:47 +00:00
iphydf
6f36b67a13
chore: Add an undefined behaviour/integer sanitizer build. 2022-02-08 09:18:18 +00:00
iphydf
0a2190f28c
feat: Add binary packing functions for tox events. 2022-02-07 02:43:24 +00:00
iphydf
de4af4c270
feat: Add async event handling (callbacks) code.
Instead of synchronously handling events as they happen in
`tox_iterate`, this first collects all events in a structure and then
lets the client process them. This allows clients to process events in
parallel, since the data structure returned is mostly immutable.

This also makes toxcore compatible with languages that don't (easily)
support callbacks from C into the non-C language.

If we remove the callbacks, this allows us to add fields to the events
without breaking the API.
2022-02-06 17:28:28 +00:00
iphydf
4d4120214a
chore: Add an easy way to run autotools and circleci builds locally. 2022-02-06 15:48:02 +00:00
iphydf
d39f803c7e
docs: Make crypto_core.h appear on doxygen. 2022-02-05 19:34:13 +00:00
iphydf
1859d0f44a
cleanup: Ensure we limit the system headers included in .h files.
Most system headers contain functions (e.g. `memcpy` in `string.h`)
which aren't needed in our own header files. For the most part, our own
headers should only include types needed to declare our own types and
functions. We now enforce this so we think twice about which headers we
really need in the .h files.
2022-02-04 20:54:37 +00:00
iphydf
71965a0f3b
feat: Add WASM build for toxcore and websocket bootstrap node.
The websocket bootstrap node will be running on Heroku.
2022-02-02 16:05:25 +00:00
jfreegman
95d0f5ccbe
Use latest toktok-stack msan version 2022-01-31 14:32:50 -05:00
iphydf
b6f48b3b7d
chore: Rename bazel-release to -opt and -debug to -dbg. 2022-01-29 22:21:13 +00:00
iphydf
2b783c4170
chore: Don't run sonar scan on pull requests.
This reverts commit e3d20afc6a.

It doesn't work.
2022-01-29 16:29:50 +00:00
Robin Linden
2cfa872818
Add a Bazel Buildifier CI job 2022-01-28 00:55:07 +01:00
zugz (tox)
1157e4e68c
Separate run_auto_tests into a library 2022-01-25 14:25:36 -05:00
jfreegman
10d59d610b
Refactor autotest live network bootstrapping
- Use one node list and public bootstrap function for all autotests
- Use ifdefs for testnet/mainnet nodes
- Replace a few broken nodes with working ones
2022-01-22 11:24:28 -05:00
iphydf
7f94e411a9
chore: Add cpplint to the CI. 2022-01-17 23:42:38 +00:00
iphydf
e3d20afc6a
chore: Run sonar scan on pull requests. 2022-01-17 23:23:14 +00:00
iphydf
fdadcb0a90
chore: Add a make_single_file script, used for CI.
This will also be used for static analysers that can't deal with multiple
source files.
2022-01-17 21:12:25 +00:00
iphydf
5fbcbb6c83
cleanup: Remove uses of strcpy and sprintf.
Use of `strcpy` in these particular cases was safe, but it's hard to
tell and also useless. `strcpy` would effectively need to do another
`strlen` which we already did.

Also removed sprintf, which was also safe in this case but it's easier to
be "obviously safe", especially for static analysers.
2022-01-17 18:25:40 +00:00
iphydf
09bb9b8a23
cleanup: Make Networking_Core pointer-to-const where possible. 2022-01-16 01:09:44 +00:00
iphydf
8d19757f8e
chore: Add mypy Python type check.
Also fix the types in all Python files.
2022-01-14 19:55:37 +00:00
iphydf
c81038c963
chore: Add sonar-scan analysis on pushes.
We can't run this on pull requests because it needs access to the
`SONAR_TOKEN` secret. Perhaps in the future we can make it a
`pull_request_target` workflow, but then we can't use cmake to initialise
the environment, meaning we need to specify the inputs manually.
2022-01-14 12:38:35 +00:00
iphydf
d23222c92f
chore: Run static analysers in multiple variants.
Currently: 1) libsodium and 2) nacl.

Note that the "nacl" variant is actually libsodium. We just want to make
sure the static analysers see the `VANILLA_NACL` code paths.
2022-01-14 10:45:11 +00:00
iphydf
28b5e512a2
fix: Fix toxav_basic_test buffer overflow.
We should pass the number of samples, not the byte size of `PCM`.
2022-01-13 22:36:53 +00:00
iphydf
4a2cb37e4b
fix: Fix some uninitialised memory errors found by valgrind and msan.
Also added a valgrind build to run it on every pull request. I've had to
disable a few tests because valgrind makes those run infinitely slowly,
consistently timing them out.
2022-01-13 20:15:21 +00:00
iphydf
46a443f188
chore: Ignore failures from bazel-tsan and bazel-asan.
Also increased memory limits so it doesn't OOM.
2022-01-13 00:36:34 +00:00
iphydf
5ab301ecab
chore: Remove all references to Travis CI.
Travis gave up on FOSS, so no more free advertisement for Travis.
2022-01-10 01:17:46 +00:00
Robin Linden
fe7b467df4
Add a GH Actions code coverage job 2022-01-06 16:39:48 +01:00
iphydf
277f512dbb
chore: Add bazel-debug build.
This has in the already found real bugs that only happen when compiling
with stack protector and no optimisations.
2022-01-02 03:15:39 +00:00
iphydf
8cd4827a14
cleanup: Reduce the scope of for-loop iterator variables.
Found by tokstyle after https://github.com/TokTok/hs-tokstyle/pull/95.
2022-01-01 03:26:41 +00:00
iphydf
6f61de54d3
chore: Add "tcc" and "compcert" compiler targets.
It's nice we are able to compile with `tcc`. Let's not break that.
CompCert is also neat, but its interpreter mode doesn't work on tox, so
we only use the compiler.
2021-12-30 23:09:23 +00:00
iphydf
8ce2ae0fcb
chore: Add macOS build. 2021-12-28 23:28:48 +00:00
iphydf
b8c7c2a923
chore: Login to dockerhub before trying to push to dockerhub. 2021-12-23 17:26:17 +00:00
iphydf
1639703c62
chore: Only push versioned docker image on tag builds. 2021-12-23 16:49:57 +00:00
iphydf
1e11865c4c
chore: Add bootstrap daemon docker image build.
This will also push to dockerhub on merge.
2021-12-23 15:54:24 +00:00
iphydf
93fa988a9d
chore: Don't run CI on master branch pushes.
All pushes have already been checked in the pull request. This is just
duplicate work, wasting GH action runners.
2021-12-22 11:03:13 +00:00
iphydf
78c26e3c0d
chore: Move cmake-freebsd-stage2 back into the toxcore repo.
This is more likely to change with the code so should live here, not in
dockerfiles.
2021-12-21 14:43:02 +00:00
iphydf
656c7692a3
chore: Add FreeBSD build to CI. 2021-12-20 23:57:16 +00:00
iphydf
9e659e6577
chore: Add cross compilation CI targets.
To test the cross compilation dockerfile.
2021-12-20 01:47:05 +00:00
iphydf
5c1796d3c4
chore: Use docker for the autotools ci build.
This makes it easier to run it locally for testing and ensures the
dockerfile continues to work.
2021-12-14 15:51:51 +00:00
iphydf
5c53e6a30f
chore: Add autotools build; exempt crypto_pwhash from tokstyle. 2021-12-13 18:47:45 +00:00
iphydf
b3c757e9d8
chore: Use an incrementing version number for coverity scans.
Otherwise, no analysis will happen.
2021-12-10 16:53:57 +00:00
iphydf
31a61f9b37
chore: Add missing -fi flag to autoreconf in coverity scan. 2021-12-10 13:02:08 +00:00
iphydf
fd91bbdd7b
test: Add a simple test for ip_ntoa.
Just to demonstrate that it will never exceed its input buffer.
2021-12-09 20:51:15 +00:00
iphydf
e174e68198
chore: Add missing sudo to coverity apt-get calls. 2021-12-09 15:33:15 +00:00
iphydf
716cc2f2ee
chore: Add clang-tidy review github workflow. 2021-12-09 15:29:31 +00:00