Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libcdada for openSUSE:Factory checked in at 2026-01-29 18:59:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcdada (Old) and /work/SRC/openSUSE:Factory/.libcdada.new.1995 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcdada" Thu Jan 29 18:59:30 2026 rev:7 rq:1329841 version:0.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libcdada/libcdada.changes 2025-10-03 15:46:39.544596215 +0200 +++ /work/SRC/openSUSE:Factory/.libcdada.new.1995/libcdada.changes 2026-01-29 18:59:36.174048747 +0100 @@ -1,0 +2,9 @@ +Wed Jan 28 19:46:51 UTC 2026 - Andreas Stieger <[email protected]> + +- update to 0.6.3: + * fix build with GCC 16 boo#1256970 +- includes changes from 0.6.2: + * map: fix garbage in prev_val when key not in map for + cdada_map_insert_replace() + +------------------------------------------------------------------- Old: ---- libcdada-0.6.1.tar.gz New: ---- libcdada-0.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcdada.spec ++++++ --- /var/tmp/diff_new_pack.5EU1Ec/_old 2026-01-29 18:59:37.278095484 +0100 +++ /var/tmp/diff_new_pack.5EU1Ec/_new 2026-01-29 18:59:37.278095484 +0100 @@ -3,6 +3,7 @@ # # Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2021, Martin Hauke <[email protected]> +# Copyright (c) 2026 Andreas Stieger <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +20,7 @@ %define sover 0 Name: libcdada -Version: 0.6.1 +Version: 0.6.3 Release: 0 Summary: Basic data structures in C (libstdc++ wrapper) License: BSD-2-Clause @@ -70,7 +71,7 @@ applications that use libcdada. %prep -%autosetup +%autosetup -p1 sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|g' tools/cdada-gen %build @@ -80,21 +81,22 @@ %install %make_install -rm -fv %{buildroot}/%{_libdir}/*.{a,la} +find %{buildroot} -type f -name "*.a" -delete -print +find %{buildroot} -type f -name "*.la" -delete -print %check %make_build check -%post -n libcdada%{sover} -p /sbin/ldconfig -%postun -n libcdada%{sover} -p /sbin/ldconfig +%ldconfig_scriptlets -n libcdada%{sover} %files -n libcdada%{sover} %license LICENSE %doc AUTHORS CHANGELOG.md README.md %doc doc/ -%{_libdir}/libcdada.so.%{sover}* +%{_libdir}/libcdada.so.%{sover}{,.*} %files devel +%license LICENSE %{_bindir}/cdada-gen %{_includedir}/cdada.h %{_includedir}/cdada ++++++ libcdada-0.6.1.tar.gz -> libcdada-0.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/.github/workflows/ci.yaml new/libcdada-0.6.3/.github/workflows/ci.yaml --- old/libcdada-0.6.1/.github/workflows/ci.yaml 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/.github/workflows/ci.yaml 2026-01-28 18:58:51.000000000 +0100 @@ -10,24 +10,54 @@ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: - gcc_ubuntu_18_04: + ubuntu_18_04_gcc: strategy: matrix: version: [4.8, 5, 6, 8] - runs-on: ubuntu-22.04 - container: - image: ubuntu:18.04 + runs-on: ubuntu-24.04 env: CPP: cpp-${{ matrix.version }} CC: gcc-${{ matrix.version }} CXX: g++-${{ matrix.version }} steps: - - name: "Install git..." + - name: "Checkout libcdada" + uses: actions/checkout@v3 + with: + path: libcdada + + - name: Run tests in Ubuntu 18.04 container run: | - apt-get update && apt-get install -y software-properties-common && \ - apt-get update && add-apt-repository -y ppa:git-core/ppa && \ - apt-get update && apt-get install -y git + docker run --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace \ + -e CPP="${CPP}" \ + -e CC="${CC}" \ + -e CXX="${CXX}" \ + -e CONFIG_FLAGS="--disable-silent-rules" \ + ubuntu:18.04 \ + bash -c " + set -e + apt-get update + apt-get install -y software-properties-common + add-apt-repository -y ppa:git-core/ppa + apt-get update + apt-get install -y git + git config --global --add safe.directory /workspace/libcdada + ./libcdada/.github/workflows/deps.sh gcc ${{ matrix.version }} + cd libcdada && .github/workflows/test_script.sh + CONFIG_FLAGS=\"\$CONFIG_FLAGS --enable-debug\" .github/workflows/test_script.sh + " + ubuntu_22_04_gcc: + strategy: + matrix: + version: [9, 10, 11, 12] + runs-on: ubuntu-22.04 + env: + CPP: cpp-${{ matrix.version }} + CC: gcc-${{ matrix.version }} + CXX: g++-${{ matrix.version }} + steps: - name: "Checkout libcdada" uses: actions/checkout@v3 with: @@ -45,11 +75,11 @@ env: CONFIG_FLAGS: --disable-silent-rules --enable-debug - gcc_ubuntu_22_04: + ubuntu_24_04_gcc: strategy: matrix: - version: [9, 10, 11, 12] - runs-on: ubuntu-22.04 + version: [13, 14] + runs-on: ubuntu-24.04 env: CPP: cpp-${{ matrix.version }} CC: gcc-${{ matrix.version }} @@ -72,7 +102,43 @@ env: CONFIG_FLAGS: --disable-silent-rules --enable-debug - clang_ubuntu_22_04: + ubuntu_25_10_gcc: + strategy: + matrix: + version: [15] + runs-on: ubuntu-24.04 + env: + CPP: cpp-${{ matrix.version }} + CC: gcc-${{ matrix.version }} + CXX: g++-${{ matrix.version }} + steps: + - name: "Checkout libcdada" + uses: actions/checkout@v3 + with: + path: libcdada + + - name: Run tests in Ubuntu 25.10 container + run: | + docker run --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace \ + -e PPA_TOOLCHAIN_REPO="false" \ + -e CPP="${CPP}" \ + -e CC="${CC}" \ + -e CXX="${CXX}" \ + -e CONFIG_FLAGS="--disable-silent-rules" \ + ubuntu:25.10 \ + bash -c " + set -e + apt-get update + apt-get install -y git + git config --global --add safe.directory /workspace/libcdada + ./libcdada/.github/workflows/deps.sh gcc ${{ matrix.version }} + cd libcdada && .github/workflows/test_script.sh + CONFIG_FLAGS=\"\$CONFIG_FLAGS --enable-debug\" .github/workflows/test_script.sh + " + + ubuntu_22_04_clang: strategy: matrix: version: [11, 12, 13, 14] @@ -80,6 +146,35 @@ env: CPP: clang-cpp-${{ matrix.version }} CC: clang-${{ matrix.version }} + CXX: clang++-${{ matrix.version }} + CFLAGS: -gdwarf-4 #clang14 and on use dwarf5, but valgrind doesn't support it + CXXFLAGS: -gdwarf-4 + steps: + - name: "Checkout libcdada" + uses: actions/checkout@v3 + with: + path: libcdada + + - name: "Install deps" + run: ./libcdada/.github/workflows/deps.sh clang ${{ matrix.version }} + + - name: "Compile and test using clang-${{ matrix.version }}" + run: cd libcdada && .github/workflows/test_script.sh + env: + CONFIG_FLAGS: --disable-silent-rules + - name: "Compile and test using clang-${{ matrix.version }} (DEBUG)" + run: cd libcdada && .github/workflows/test_script.sh + env: + CONFIG_FLAGS: --disable-silent-rules --enable-debug + + ubuntu_24_04_clang: + strategy: + matrix: + version: [15, 16, 17, 18, 19] + runs-on: ubuntu-24.04 + env: + CPP: clang-cpp-${{ matrix.version }} + CC: clang-${{ matrix.version }} CXX: clang++-${{ matrix.version }} CFLAGS: -gdwarf-4 #clang14 and on use dwarf5, but valgrind doesn't support it CXXFLAGS: -gdwarf-4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/.github/workflows/deps.sh new/libcdada-0.6.3/.github/workflows/deps.sh --- old/libcdada-0.6.1/.github/workflows/deps.sh 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/.github/workflows/deps.sh 2026-01-28 18:58:51.000000000 +0100 @@ -12,6 +12,8 @@ fi (sudo --help > /dev/null 2>&1 ) || (apt update && apt install -y sudo software-properties-common automake autoconf libtool make) #containers -sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" +if [[ "${PPA_TOOLCHAIN_REPO}" != "false" ]]; then + sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" +fi sudo apt-get update sudo apt-get install -y python3 valgrind $COMPILER diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/.gitignore new/libcdada-0.6.3/.gitignore --- old/libcdada-0.6.1/.gitignore 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/.gitignore 2026-01-28 18:58:51.000000000 +0100 @@ -45,3 +45,4 @@ !.gitignore !.travis.yml +!.github/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/CHANGELOG.md new/libcdada-0.6.3/CHANGELOG.md --- old/libcdada-0.6.1/CHANGELOG.md 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/CHANGELOG.md 2026-01-28 18:58:51.000000000 +0100 @@ -9,6 +9,15 @@ - [O] Other ``` +### v0.6.3 (28th January 2026) + +- [O] tests/CI: fixed compilation with GCC 16 (thanks A. Stieger). Added CI coverage for GCC 15. + +### v0.6.2 (24th October 2025) + +- [B] map: fix garbage in `prev_val` when key not in map for `cdada_map_insert_replace()` +- [O] CI fixes + ### v0.6.1 (29th July 2024) - [O] tests: fix segfault in map_test.c @@ -17,7 +26,7 @@ ### v0.6.0 (17th April 2024) - [+] !! BREAKING CHANGE !! Add `prev_val` to `cdada_map_insert_replace()` API call to make it more useful -- [O] CI: add coverage for clang11, 12 and 13. +- [O] CI: add coverage for clang11, 12 and 13 ### v0.5.2 (7th November 2023) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/README.md new/libcdada-0.6.3/README.md --- old/libcdada-0.6.1/README.md 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/README.md 2026-01-28 18:58:51.000000000 +0100 @@ -1,4 +1,4 @@ -master [](https://github.com/msune/libcdada/actions), devel [](https://github.com/msune/libcdada/actions) +master [](https://github.com/msune/libcdada/actions/workflows/ci.yaml), devel [](https://github.com/msune/libcdada/actions/workflows/ci.yaml) **libcdada** - basic data structures in C (`libstdc++` wrapper) --------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/VERSION new/libcdada-0.6.3/VERSION --- old/libcdada-0.6.1/VERSION 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/VERSION 2026-01-28 18:58:51.000000000 +0100 @@ -1 +1 @@ -v0.6.1 +v0.6.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/include/cdada/__map_internal.h new/libcdada-0.6.3/include/cdada/__map_internal.h --- old/libcdada-0.6.1/include/cdada/__map_internal.h 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/include/cdada/__map_internal.h 2026-01-28 18:58:51.000000000 +0100 @@ -105,17 +105,23 @@ void** prev_val){ typename std::map<T, void*>::iterator it; + if(prev_val) + *prev_val = NULL; + if(m->key_len == m->user_key_len){ T* __attribute((__may_alias__)) aux; aux = (T*)key; it = m_u->find(*aux); - if(!replace && it != m_u->end()) - return CDADA_E_EXISTS; - if(replace && prev_val) - *prev_val = it->second; + if(it != m_u->end()){ + if(!replace) + return CDADA_E_EXISTS; + + if(prev_val) + *prev_val = it->second; + } (*m_u)[*aux] = val; @@ -132,8 +138,13 @@ if(!replace && it != m_u->end()) return CDADA_E_EXISTS; - if(replace && prev_val) - *prev_val = it->second; + if(it != m_u->end()){ + if(!replace) + return CDADA_E_EXISTS; + + if(prev_val) + *prev_val = it->second; + } (*m_u)[aux] = val; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/include/cdada/map.h new/libcdada-0.6.3/include/cdada/map.h --- old/libcdada-0.6.1/include/cdada/map.h 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/include/cdada/map.h 2026-01-28 18:58:51.000000000 +0100 @@ -179,8 +179,9 @@ * @param map Map pointer * @param key Key. The key type _must_ have all bytes initialized * @param val Pointer to the value -* @param prev_val If not NULL, when replacing a value the previous value will be -* set here, regardless if the operation is successful or not +* @param prev_val If not NULL the previous stored value for that key will be set +* here (*prev_val = old_value_ptr). If the key didn't exist, it +* will be set to NULL. * * @returns Return codes: * CDADA_SUCCESS: element is inserted diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/test/map_test.c new/libcdada-0.6.3/test/map_test.c --- old/libcdada-0.6.1/test/map_test.c 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/test/map_test.c 2026-01-28 18:58:51.000000000 +0100 @@ -993,6 +993,51 @@ return 0; } +int test_insert_replace_bug_empty(){ + int rv; + uint8_t key; + test_u552_t key2; + int value, *prev = NULL; + + //Test insert_replace when key doesn't exist in the map + map = cdada_map_create(uint8_t); + TEST_ASSERT(map != NULL); + + key = 1; + //Note: prev is deliberately != NULL, as code MUST nullify + prev = (int*)0x1234; + rv = cdada_map_insert_replace(map, &key, &value, (void**)&prev); + TEST_ASSERT(rv == CDADA_SUCCESS); + TEST_ASSERT(prev == NULL); + + rv = cdada_map_insert_replace(map, &key, &value, (void**)&prev); + TEST_ASSERT(rv == CDADA_SUCCESS); + TEST_ASSERT(prev == &value); + rv = cdada_map_destroy(map); + TEST_ASSERT(rv == CDADA_SUCCESS); + + //Test insert_replace when key doesn't exist in the map + map = cdada_map_create(test_u552_t); + TEST_ASSERT(map != NULL); + + memset(&key2, 0, sizeof(key2)); + key2.mid = 1; + prev = (int*)0x1234; + + //if not found + rv = cdada_map_insert_replace(map, &key2, &value, (void**)&prev); + TEST_ASSERT(rv == CDADA_SUCCESS); + TEST_ASSERT(prev == NULL); + + rv = cdada_map_insert_replace(map, &key2, &value, (void**)&prev); + TEST_ASSERT(rv == CDADA_SUCCESS); + TEST_ASSERT(prev == &value); + rv = cdada_map_destroy(map); + TEST_ASSERT(rv == CDADA_SUCCESS); + + return 0; +} + int main(int args, char** argv){ int rv; @@ -1012,6 +1057,8 @@ rv |= test_u552_insert_removal_traverse_custom(); rv |= test_u3552_insert_removal_traverse_custom(); + rv |= test_insert_replace_bug_empty(); + //Add your test here, and return a code appropriately... return rv == 0? EXIT_SUCCESS : EXIT_FAILURE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdada-0.6.1/test/stack_test.c new/libcdada-0.6.3/test/stack_test.c --- old/libcdada-0.6.1/test/stack_test.c 2024-07-29 23:44:31.000000000 +0200 +++ new/libcdada-0.6.3/test/stack_test.c 2026-01-28 18:58:51.000000000 +0100 @@ -746,8 +746,7 @@ TEST_ASSERT(rv == CDADA_SUCCESS); TEST_ASSERT(key.mid == 1); - int jj; - for(jj = 0, i=0;i<5; ++i, jj += 1){ + for(i=0;i<5; ++i){ key.mid = 0; rv = cdada_stack_push(stack, &key); TEST_ASSERT(rv == CDADA_SUCCESS); @@ -906,8 +905,7 @@ TEST_ASSERT(rv == CDADA_SUCCESS); TEST_ASSERT(key.mid == 1); - int jj; - for(jj = 0, i=0;i<5; ++i, jj += 1){ + for(i=0;i<5; ++i){ key.mid = 0; rv = cdada_stack_push(stack, &key); TEST_ASSERT(rv == CDADA_SUCCESS);
