c-toxcore latest master Merge commit 'fd4c16d090fa334ffe36b4be7961c46a800c2038'
Some checks failed
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 5m8s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 6m34s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled

This commit is contained in:
Green Sky 2024-09-19 13:45:12 +02:00
commit 6af0ddc3ec
No known key found for this signature in database
12 changed files with 28 additions and 22 deletions

View File

@ -62,7 +62,7 @@ jobs:
- run: &apt_install - run: &apt_install
apt-get update && apt-get update &&
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
apt-get install -y --no-install-recommends apt-get install -y
ca-certificates ca-certificates
clang clang
cmake cmake
@ -141,9 +141,7 @@ jobs:
- run: *apt_install - run: *apt_install
- run: - run:
apt-get install -y --no-install-recommends apt-get install -y --no-install-recommends
ca-certificates cpplint
python3-pip
- checkout - checkout
- run: git submodule update --init --recursive - run: git submodule update --init --recursive
- run: pip install cpplint
- run: other/analysis/run-cpplint - run: other/analysis/run-cpplint

View File

@ -10,7 +10,7 @@ ABI=${1:-"armeabi-v7a"}
case $ABI in case $ABI in
armeabi-v7a) armeabi-v7a)
TARGET=armv7a-linux-androideabi TARGET=armv7a-linux-androideabi
NDK_API=19 NDK_API=21
;; ;;
arm64-v8a) arm64-v8a)
TARGET=aarch64-linux-android TARGET=aarch64-linux-android
@ -18,7 +18,7 @@ case $ABI in
;; ;;
x86) x86)
TARGET=i686-linux-android TARGET=i686-linux-android
NDK_API=19 NDK_API=21
;; ;;
x86_64) x86_64)
TARGET=x86_64-linux-android TARGET=x86_64-linux-android

View File

@ -39,12 +39,17 @@ add_flag -Wno-reserved-id-macro
# TODO(iphydf): Clean these up. They are likely not bugs, but still # TODO(iphydf): Clean these up. They are likely not bugs, but still
# potential issues and probably confusing. # potential issues and probably confusing.
add_flag -Wno-sign-compare add_flag -Wno-sign-compare
# We don't want to have default cases, we want to explicitly define all cases
add_flag -Wno-switch-default
# __attribute__((nonnull)) causes this warning on defensive null checks. # __attribute__((nonnull)) causes this warning on defensive null checks.
add_flag -Wno-tautological-pointer-compare add_flag -Wno-tautological-pointer-compare
# Our use of mutexes results in a false positive, see 1bbe446. # Our use of mutexes results in a false positive, see 1bbe446.
add_flag -Wno-thread-safety-analysis add_flag -Wno-thread-safety-analysis
# File transfer code has this. # File transfer code has this.
add_flag -Wno-type-limits add_flag -Wno-type-limits
# Generates false positives in toxcore similar to
# https://github.com/llvm/llvm-project/issues/64646
add_flag -Wno-unsafe-buffer-usage
# Callbacks often don't use all their parameters. # Callbacks often don't use all their parameters.
add_flag -Wno-unused-parameter add_flag -Wno-unused-parameter
# cimple does this better # cimple does this better

View File

@ -96,7 +96,7 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Export GitHub Actions cache environment variables - name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6 uses: actions/github-script@v7
with: with:
script: | script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');

View File

@ -28,8 +28,10 @@ run() {
-Wno-old-style-cast \ -Wno-old-style-cast \
-Wno-padded \ -Wno-padded \
-Wno-sign-compare \ -Wno-sign-compare \
-Wno-switch-default \
-Wno-tautological-pointer-compare \ -Wno-tautological-pointer-compare \
-Wno-unreachable-code-return \ -Wno-unreachable-code-return \
-Wno-unsafe-buffer-usage \
-Wno-unused-parameter \ -Wno-unused-parameter \
-Wno-used-but-marked-unused \ -Wno-used-but-marked-unused \
-Wno-source-uses-openmp -Wno-source-uses-openmp

View File

@ -200,6 +200,8 @@ bool get_general_config(const char *cfg_file_path, char **pid_file_path, char **
*keys_file_path = (char *)malloc(keys_file_path_len); *keys_file_path = (char *)malloc(keys_file_path_len);
if (*keys_file_path == nullptr) { if (*keys_file_path == nullptr) {
log_write(LOG_LEVEL_ERROR, "Allocation failure.\n"); log_write(LOG_LEVEL_ERROR, "Allocation failure.\n");
free(*pid_file_path);
*pid_file_path = nullptr;
return false; return false;
} }
memcpy(*keys_file_path, tmp_keys_file, keys_file_path_len); memcpy(*keys_file_path, tmp_keys_file, keys_file_path_len);

View File

@ -13,7 +13,7 @@ COPY --from=sources /src/ /work/
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN git clone --depth=1 https://github.com/jedisct1/libsodium /work/libsodium RUN git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium /work/libsodium
COPY other/docker/compcert/Makefile /work/ COPY other/docker/compcert/Makefile /work/
RUN make "-j$(nproc)" RUN make "-j$(nproc)"
RUN ./send_message_test | grep 'tox clients connected' RUN ./send_message_test | grep 'tox clients connected'

View File

@ -52,7 +52,7 @@ if [ "$SUPPORT_TEST" = "true" ]; then
https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
. ./check_sha256.sh . ./check_sha256.sh
check_sha256 "78b185fabdb323971d13bd329fefc8038e08559aa51c4996de18db0639a51df6" \ check_sha256 "d965d646defe94b3dfba6d5b4406900ac6c81065428bf9d9303ad7a72ee8d1b8" \
"/etc/apt/keyrings/winehq-archive.key" "/etc/apt/keyrings/winehq-archive.key"
check_sha256 "8dd8ef66c749d56e798646674c1c185a99b3ed6727ca0fbb5e493951e66c0f9e" \ check_sha256 "8dd8ef66c749d56e798646674c1c185a99b3ed6727ca0fbb5e493951e66c0f9e" \
"/etc/apt/sources.list.d/winehq-bookworm.sources" "/etc/apt/sources.list.d/winehq-bookworm.sources"

View File

@ -34,6 +34,7 @@ RUN . "/work/emsdk/emsdk_env.sh" \
&& emconfigure ./configure --disable-shared \ && emconfigure ./configure --disable-shared \
--without-pthreads \ --without-pthreads \
--disable-ssp --disable-asm --disable-pie \ --disable-ssp --disable-asm --disable-pie \
--host x86_64-linux-gnu \
&& emmake make install -j8 && emmake make install -j8
# Build an unused libsodium binding first so emcc caches all the system # Build an unused libsodium binding first so emcc caches all the system

View File

@ -805,7 +805,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
header.flags |= RTP_KEY_FRAME; header.flags |= RTP_KEY_FRAME;
} }
const uint16_t rdata_size = length + RTP_HEADER_SIZE + 1; const uint16_t rdata_size = min_u32(length + RTP_HEADER_SIZE + 1, MAX_CRYPTO_DATA_SIZE);
VLA(uint8_t, rdata, rdata_size); VLA(uint8_t, rdata, rdata_size);
memset(rdata, 0, rdata_size); memset(rdata, 0, rdata_size);
rdata[0] = session->payload_type; // packet id == payload_type rdata[0] = session->payload_type; // packet id == payload_type

View File

@ -2468,15 +2468,13 @@ static void do_friends(Messenger *m, void *userdata)
} }
} }
if (m->friendlist[i].status == FRIEND_REQUESTED
|| m->friendlist[i].status == FRIEND_CONFIRMED) { /* friend is not online. */
if (m->friendlist[i].status == FRIEND_REQUESTED) { if (m->friendlist[i].status == FRIEND_REQUESTED) {
/* If we didn't connect to friend after successfully sending him a friend request the request is deemed /* If we didn't connect to friend after successfully sending him a friend
* unsuccessful so we set the status back to FRIEND_ADDED and try again. * request the request is deemed unsuccessful so we set the status back to
* FRIEND_ADDED and try again.
*/ */
check_friend_request_timed_out(m, i, temp_time, userdata); check_friend_request_timed_out(m, i, temp_time, userdata);
} }
}
if (m->friendlist[i].status == FRIEND_ONLINE) { /* friend is online. */ if (m->friendlist[i].status == FRIEND_ONLINE) { /* friend is online. */
if (!m->friendlist[i].name_sent) { if (!m->friendlist[i].name_sent) {

View File

@ -32,7 +32,7 @@ TEST(BinPack, PackedUint64CanBeUnpacked)
}, },
&orig, nullptr, buf.data(), buf.size())); &orig, nullptr, buf.data(), buf.size()));
uint64_t unpacked; uint64_t unpacked = 0;
EXPECT_TRUE(bin_unpack_obj( EXPECT_TRUE(bin_unpack_obj(
[](void *obj, Bin_Unpack *bu) { [](void *obj, Bin_Unpack *bu) {
return bin_unpack_u64_b(bu, static_cast<uint64_t *>(obj)); return bin_unpack_u64_b(bu, static_cast<uint64_t *>(obj));
@ -51,7 +51,7 @@ TEST(BinPack, MsgPackedUint8CanBeUnpackedAsUint32)
}, },
&orig, nullptr, buf.data(), buf.size())); &orig, nullptr, buf.data(), buf.size()));
uint32_t unpacked; uint32_t unpacked = 0;
EXPECT_TRUE(bin_unpack_obj( EXPECT_TRUE(bin_unpack_obj(
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u32(bu, static_cast<uint32_t *>(obj)); }, [](void *obj, Bin_Unpack *bu) { return bin_unpack_u32(bu, static_cast<uint32_t *>(obj)); },
&unpacked, buf.data(), buf.size())); &unpacked, buf.data(), buf.size()));
@ -68,7 +68,7 @@ TEST(BinPack, MsgPackedUint32CanBeUnpackedAsUint8IfSmallEnough)
}, },
&orig, nullptr, buf.data(), buf.size())); &orig, nullptr, buf.data(), buf.size()));
uint8_t unpacked; uint8_t unpacked = 0;
EXPECT_TRUE(bin_unpack_obj( EXPECT_TRUE(bin_unpack_obj(
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); }, [](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); },
&unpacked, buf.data(), buf.size())); &unpacked, buf.data(), buf.size()));
@ -86,7 +86,7 @@ TEST(BinPack, LargeMsgPackedUint32CannotBeUnpackedAsUint8)
}, },
&orig, nullptr, buf.data(), buf.size())); &orig, nullptr, buf.data(), buf.size()));
uint8_t unpacked; uint8_t unpacked = 0;
EXPECT_FALSE(bin_unpack_obj( EXPECT_FALSE(bin_unpack_obj(
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); }, [](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); },
&unpacked, buf.data(), buf.size())); &unpacked, buf.data(), buf.size()));