Commit Graph

47 Commits

Author SHA1 Message Date
iphydf
afc38f2458
test: Add more unit tests for add_to_list. 2024-01-10 02:58:13 +00:00
iphydf
05ce5c1ab9
test: Add "infer" CI check to github, remove from circle.
This now uses our own built image with the current master of infer.
2024-01-09 10:59:53 +00:00
iphydf
ef4897a898
cleanup: Upgrade to clang-tidy-17 and fix some warnings. 2023-12-27 01:05:47 +00:00
iphydf
b7f9367f6f
test: Upgrade cppcheck, fix some warnings.
Also started teaching it about toxcore's alloc/dealloc functions in
hopes of it catching some errors (it doesn't seem to be very good at
this, but maybe better than nothing?).
2023-12-27 00:00:10 +00:00
iphydf
3983369103
fix: Enable debug flag for ubsan.
Otherwise the nullability annotations are compiled out in attributes.h.
2023-12-09 01:14:53 +00:00
iphydf
58fac53429
refactor: Add a bin_unpack_bin_max for max-length arrays.
These are statically allocated (e.g. `uint8_t[1024]`) arrays with
variable length data inside them. Examples are group topics and
nicknames.
2023-11-12 00:57:44 +00:00
iphydf
6be29f01e5
chore: Add more logging to loading conferences from savedata.
Better error messages than "something went wrong in type 20".

Also fix bazel-asan/tsan builds.

https://github.com/tweag/rules_nixpkgs/issues/442 is blocking fuzz
tests under asan.
2023-11-08 15:51:11 +00:00
iphydf
48dbcfebc0
cleanup: Remove redundant -DSODIUM_EXPORT from definitions.
`-DSODIUM_STATIC` implies `-DSODIUM_EXPORT`.
2023-09-11 19:43:00 +00:00
iphydf
4d3c97f49d
cleanup: Enforce stricter identifier naming using clang-tidy. 2023-08-31 13:37:16 +00:00
iphydf
7205db72e4
cleanup: Remove check_recursion, since tokstyle checks this now.
And tokstyle is better at it, covering not just direct recursion, but
also (most possible instances of) recursion through function pointers.
2022-05-24 21:35:16 +02:00
iphydf
ae369dc2e7
test: Enable more tests for msan. 2022-03-27 22:26:15 +00:00
sudden6
bc006beb4e
cleanup: split CMakeLists.txt and add some missing targets 2022-03-27 20:09:10 +02:00
iphydf
ee154da4a9
refactor: Use cmp instead of msgpack-c for events packing.
This library is better in every way.
2022-03-26 23:57:15 +00:00
iphydf
2b2eb41211
chore: Enable memory sanitizer build.
I don't know if this will actually work, or how many of these "fixes" I
need to get msan to be happy on CI. For me locally, it all works fine.
On CI, for some reason it's not fine even though I run in the exact same
docker image as CI.
2022-03-19 03:11:16 +00:00
iphydf
73d52cdb33
chore: Disable non-null attributes by default.
We enable them on CI, but a default build will compile without them so a
default build doesn't end up with lots of warnings (which we also
disable on CI).
2022-02-10 21:33:51 +00:00
iphydf
6f36b67a13
chore: Add an undefined behaviour/integer sanitizer build. 2022-02-08 09:18:18 +00:00
iphydf
71d5f8a4c3
chore: Speed up cmake builds with UNITY_BUILD.
`dht_test` breaks with unity build because it includes `DHT.c`. It
really shouldn't do that, but I'm not fixing that in this PR.
2022-02-08 01:07:58 +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
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
jfreegman
95d0f5ccbe
Use latest toktok-stack msan version 2022-01-31 14:32:50 -05: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
f7557b4c16
cleanup: Even more pointer-to-const parameters.
I missed these the first time around.
2022-01-16 02:35:08 +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
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
210ea9e25c
chore: Retry asan/tsan tests a few more times.
These are somewhat flaky. A few more retries should make them pass unless
they are properly broken. Most of the time they time out and one more
attempt would pass it. I've added 2 more attempts.
2022-01-10 14:46:58 +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
iphydf
2ba2cbd8e9
chore: Fix gen-file.sh: it wasn't globbing properly.
Also fix crypto_core_test.cc to comply with the stack frame limit.
2021-12-14 21:26:52 +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
d930ecca4c
chore: Run infer static analyser on circle ci builds.
Also running some other analysis that we used to have on Travis.
2021-12-06 20:25:50 +00:00
iphydf
3d601fe320
style: Run restyled on Travis and Circle CI scripts. 2020-05-08 01:31:24 +01:00
iphydf
de3c21b5b7
Disable non-hermetic tests by default.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955319.
2020-04-29 12:09:34 +00:00
iphydf
2c45d45133
Fix continuous integration builds. 2020-04-24 14:43:37 +00:00
iphydf
2a79748ed9
Give CI workflow a better name: clang-sanitizers 2020-04-08 19:02:40 +00:00
zoff99
4ec65c28d7
Show function names in asan/tsan stack traces on CircleCI. 2020-04-04 21:32:43 +00:00
iphydf
76b4ac4a71
Add MIN_LOGGER_LEVEL to the Circle CI builds.
This was changed a while back, and TRACE is no longer valid.
2019-01-06 16:13:31 +00:00
chrono
17a7bf3fd2
Add AUTOTEST Option to CMakeLists.txt 2018-10-07 22:09:54 +00:00
iphydf
9c7c924e3c
Run UBSAN (undefined behaviour sanitizer) on Circle CI.
This runs in the same build as asan, so "asan" now stands for both asan
and ubsan.
2018-09-22 12:27:58 +00:00
iphydf
2abc00693c
Format yaml files according to yamllint's requirements.
Also remove branch filter for appveyor. We only have a single branch in
every repository. Development happens in forks.
2018-09-16 14:47:23 +00:00
iphydf
5352f48301
Make the tsan build fail instead of swallowing its errors.
We'll make it non-required, but we want to know about these failures so
we are incentivised to fix them.
2018-08-26 20:23:27 +00:00
iphydf
74e685b497
Enable color diagnostics on circleci.
See https://github.com/ninja-build/ninja/issues/814
2018-08-21 17:12:22 +00:00
iphydf
e32e0b3402
Run both asan and tsan on Circle CI. 2018-08-19 12:05:28 +00:00
iphydf
c0c3098737
Avoid side-effectful assignments in conditionals.
Only in audio.c for now. This should be done everywhere.
2018-07-08 19:34:45 +00:00
iphydf
1a54be06cd
Simplify Travis CI builds.
Have one script per build. This means more duplication between the
scripts, but it's much easier to understand and to run locally.
2018-07-01 08:35:44 +00:00
iphydf
5c2600d87b
Add new Circle CI configuration.
This one has ASAN enabled, unlike Travis.
2018-06-24 19:51:34 +00:00