Age | Commit message (Collapse) | Author |
|
|
|
|
|
We no longer allow `int a, b;`. In the few cases where we used it, we
instead better
* limit the scope of the identifier (e.g. in a for-init-decl)
* split the line and have 2 separate declarators, because the
identifiers designate different types of things (e.g. friend numbers
and group numbers).
|
|
We no longer allow:
```c
int a = 0, b = 0;
int a[3], b[3];
int a, *b;
```
But we do still allow (for now):
```c
int a, b;
```
|
|
These are more robust wrt. spaces in names.
|
|
|
|
This isn't quite Travis, but close enough for local testing.
|
|
Also added a bunch of asserts to tests where they don't check allocs.
|
|
This check puts all of our code in a C++ anonymous namespace, which is
effectively making all functions `static`. This allows the compiler to
determine that a function is unused, so we can delete it.
|
|
* Use-after-free because we free network before dht in one case.
* Various unchecked allocs in tests (not so important).
* We used to not check whether ping arrays were actually allocated in DHT.
* `ping_kill` and `ping_array_kill` used to crash when passing NULL.
Also:
* Added an assert in all public API functions to ensure tox isn't NULL.
The error message you get from that is a bit nicer than "Segmentation
fault" when clients (or our tests) do things wrong.
* Decreased the sleep time in iterate_all_wait from 20ms to 5ms.
Everything seems to still work with 5ms, and this greatly decreases
the amount of time spent per test run, making oomer run much faster.
|
|
|
|
* Use fully static build for the bootstrap daemon.
* Store a sha256sum of the binary in the repo.
* Updated documentation for it.
* Add support for fully static build in cmake.
* Enable the docker build on every PR, so we catch changes to the
checksum. I realise this is adding toil, but having the checksum is
valuable for security of released binaries.
|
|
*Total -- 23.11kb -> 12.21kb (47.19%)
/other/tox.png -- 17.50kb -> 6.99kb (60.05%)
/other/tox-warning.png -- 5.61kb -> 5.21kb (7.04%)
Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
|
|
This test was fixed by @robinlinden, but not enabled in all builds.
|
|
|
|
This one is unfortunately a little more complicated to use. I may add a
simpler API later, but for now, it's JSON-based (because I couldn't get
binary data to work without it getting mangled somewhere along the way -
JSON is at least text-transport-safe).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tox-bootstrapd can use around 600 TCP sockets during TCP server's normal
functioning. Many systems default to having a soft limit of 1024 open file
descriptors, which we are close to reaching, so it was suggested we bump that
limit to a higher number. iphy suggested increasing it to 32768.
|
|
|
|
|
|
|
|
Useful for using memory analyzing tools.
|
|
|
|
We can add it back when there is a test for it. For now, we don't know
whether it works and don't have tests to make sure it keeps working.
|
|
So it gets regenerated when the .api.h file changes.
|
|
|
|
|
|
Using the full path including the repo name.
|
|
We should avoid recursion, as it makes reasoning about stack growth
harder. This tool shows (currently) 4 (non-tail) recursive functions, at
least 2 of which are easy to fix.
|
|
|
|
Don't know why codes with macro dosen't work.
As it's only a few expensive, just code it without macro for now.
\#if (MIN_LOGGER_LEVEL == LOG_TRACE) || (MIN_LOGGER_LEVEL == LOG_DEBUG)
fprintf(stderr, "[%s] %s:%d(%s) %s\n", strlevel, file, line, func, message);
\#endif
|
|
Changes:
* 100 columns maximum (not strict, can be a bit more sometimes).
* No space after cast.
|
|
|
|
No timeout test here yet, because we don't yet have the ability to
manipulate time at will, so we would have to actually sleep.
|
|
|
|
|
|
|
|
|
|
Reduced by, e.g.:
* `file_transfer_test`: 33% of the `clock_gettime` calls.
* `tox_many_test`: 53% of the `clock_gettime` calls.
Other tests will see similar improvements. Real world applications will
be closer to 40-50% improvement, since tox_many_test has 100 nodes, while
file_transfer_test has 2 nodes.
|
|
Also remove the use of a VLA in a context where there can be unbounded
memory allocations.
|
|
This allows Tox to contain additional data on top of Messenger, making
Messenger not necessarily the most top-level object. E.g. groups are
built on Messenger and currently awkwardly void-pointered into it to
pretend there is no cyclic dependency.
|
|
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
|
|
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
|