Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package blosc2 for openSUSE:Factory checked in at 2023-10-15 19:27:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/blosc2 (Old) and /work/SRC/openSUSE:Factory/.blosc2.new.20540 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "blosc2" Sun Oct 15 19:27:32 2023 rev:8 rq:1117790 version:2.10.5 Changes: -------- --- /work/SRC/openSUSE:Factory/blosc2/blosc2.changes 2023-08-23 14:59:35.138201610 +0200 +++ /work/SRC/openSUSE:Factory/.blosc2.new.20540/blosc2.changes 2023-10-15 19:29:37.685409850 +0200 @@ -1,0 +2,23 @@ +Sat Oct 14 10:58:39 UTC 2023 - Ben Greiner <[email protected]> + +- Update to 2.10.5 + * Fix a variable name in a test that was causing a segfault in + some platforms. + * Change tuner's functions signature to return always an error + code. This allows for better error checking when using plugable + tuners in Blosc2. + * Do checks when creating contexts. +- Release 2.10.4 + * Remove duplicated tune initialization since it is already done + in blosc2_create_cctx. Thanks to Marta Iborra + * Typos fixed. Thanks to Dimitri Papadopoulos. +- Release 2.10.3 + * Globally registered new codec openhtj2k. This will be loaded + dynamically. See PR #557. + * Added a BLOSC_INFO macro for details on compression params. + * Added get_blocksize.c example on automatic blocksizes. + * Warning fixes. +- Add c-blosc2-pr563-armv7l-option.patch gh#Blosc/c-blosc2#563 + (But there is sitll a "Bus error" in the CTests) + +------------------------------------------------------------------- Old: ---- c-blosc2-2.10.2.tar.gz New: ---- c-blosc2-2.10.5.tar.gz c-blosc2-pr563-armv7l-option.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ blosc2.spec ++++++ --- /var/tmp/diff_new_pack.2fm7uH/_old 2023-10-15 19:29:38.205428582 +0200 +++ /var/tmp/diff_new_pack.2fm7uH/_new 2023-10-15 19:29:38.205428582 +0200 @@ -20,13 +20,15 @@ %define major 2 %define libname lib%{name}-%{major} Name: blosc2 -Version: 2.10.2 +Version: 2.10.5 Release: 0 Summary: A fast, compressed, persistent binary data store library for C License: BSD-2-Clause AND BSD-3-Clause AND MIT URL: https://www.blosc.org/c-blosc2/c-blosc2.html Source: https://github.com/Blosc/c-blosc2/archive/refs/tags/v%{version}.tar.gz#/c-blosc2-%{version}.tar.gz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM c-blosc2-pr563-armv7l-option.patch gh#Blosc/c-blosc2#563 +Patch0: c-blosc2-pr563-armv7l-option.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig ++++++ c-blosc2-2.10.2.tar.gz -> c-blosc2-2.10.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/.github/workflows/cmake.yml new/c-blosc2-2.10.5/.github/workflows/cmake.yml --- old/c-blosc2-2.10.2/.github/workflows/cmake.yml 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/.github/workflows/cmake.yml 2023-10-05 18:10:31.000000000 +0200 @@ -105,7 +105,7 @@ compiler: gcc steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install packages (Ubuntu) if: runner.os == 'Linux' && matrix.packages @@ -113,10 +113,9 @@ sudo apt-get update sudo apt-get install -y ${{ matrix.packages }} - # Ninja should be not necessary anymore (see note on Win / GCC above) - # - name: Install packages (Windows) - # if: runner.os == 'Windows' - # run: choco install ninja ${{ matrix.packages }} + - name: Install packages (Windows) + if: runner.os == 'Windows' + run: choco install ninja ${{ matrix.packages }} - name: Install packages (macOS) if: runner.os == 'macOS' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/ANNOUNCE.md new/c-blosc2-2.10.5/ANNOUNCE.md --- old/c-blosc2-2.10.2/ANNOUNCE.md 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/ANNOUNCE.md 2023-10-05 18:10:31.000000000 +0200 @@ -1,11 +1,11 @@ -# Announcing C-Blosc2 2.10.2 +# Announcing C-Blosc2 2.10.5 A fast, compressed and persistent binary data store library for C. ## What is new? -This is a maintenance release with also several improvements for helping -integration of C-Blosc2 in other projects (thanks to Alex Huebl). Also, -some fixes for MinGW platform are in (thanks to Biswapriyo Nath). +This is a maintenance release for fixing a segfault in tests, better error +checking when creating contexts and make tuner's functions signature to return +always an error code. For more info, please see the release notes in: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/Blosc2Config.cmake.in new/c-blosc2-2.10.5/Blosc2Config.cmake.in --- old/c-blosc2-2.10.2/Blosc2Config.cmake.in 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/Blosc2Config.cmake.in 2023-10-05 18:10:31.000000000 +0200 @@ -12,7 +12,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules") # this section stores which configuration options were set -set(HAVE_THREADS @Threads_FOUND@) +set(HAVE_THREADS @HAVE_THREADS@) set(HAVE_IPP @HAVE_IPP@) set(HAVE_ZLIB_NG @HAVE_ZLIB_NG@) set(DEACTIVATE_IPP @DEACTIVATE_IPP@) @@ -26,16 +26,13 @@ # additionally, the Blosc2_..._FOUND variables are used to support # find_package(Blosc2 ... COMPONENTS ... ...) # this enables downstream projects to express the need for specific features. -if(WIN32) - if(HAVE_THREADS) - find_dependency(Threads) - set(Blosc2_THREADS_FOUND TRUE) - else() - set(Blosc2_THREADS_FOUND FALSE) - endif() -else() +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) # pre 3.1 +set(THREADS_PREFER_PTHREAD_FLAG TRUE) # CMake 3.1+ +if(HAVE_THREADS) find_dependency(Threads) set(Blosc2_THREADS_FOUND TRUE) +else() + set(Blosc2_THREADS_FOUND FALSE) endif() if(NOT DEACTIVATE_IPP AND HAVE_IPP) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/CMakeLists.txt new/c-blosc2-2.10.5/CMakeLists.txt --- old/c-blosc2-2.10.2/CMakeLists.txt 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/CMakeLists.txt 2023-10-05 18:10:31.000000000 +0200 @@ -151,6 +151,21 @@ set(DEACTIVATE_ZSTD ON) endif() +# Threads +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) # pre 3.1 +set(THREADS_PREFER_PTHREAD_FLAG TRUE) # CMake 3.1+ +if(WIN32) + # try to use the system library + find_package(Threads) +else() + find_package(Threads REQUIRED) +endif() +if(Threads_FOUND) + set(HAVE_THREADS ON) +else() + set(HAVE_THREADS OFF) +endif() + if(PREFER_EXTERNAL_LZ4) find_package(LZ4) else() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/RELEASE_NOTES.md new/c-blosc2-2.10.5/RELEASE_NOTES.md --- old/c-blosc2-2.10.2/RELEASE_NOTES.md 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/RELEASE_NOTES.md 2023-10-05 18:10:31.000000000 +0200 @@ -1,12 +1,46 @@ Release notes for C-Blosc2 ========================== +Changes from 2.10.4 to 2.10.5 +============================= + +* Fix a variable name in a test that was causing a segfault in some platforms. + +* Change tuner's functions signature to return always an error code. This allows + for better error checking when using plugable tuners in Blosc2. + +* Do checks when creating contexts. + + +Changes from 2.10.3 to 2.10.4 +============================= + +* Remove duplicated tune initialization since it is already done in blosc2_create_cctx. + Thanks to Marta Iborra + +* Typos fixed. Thanks to Dimitri Papadopoulos. + + +Changes from 2.10.2 to 2.10.3 +============================= + +* Globally registered new codec `openhtj2k`. This will be loaded dynamically. See PR #557. + +* Added a `BLOSC_INFO` macro for details on compression params. + +* Added `get_blocksize.c` example on automatic blocksizes. + +* Warning fixes. + +* Fixes for mingw. + + Changes from 2.10.1 to 2.10.2 ============================= * Several fixes for the CMake system. Thanks to Axel Huebl. See PR #541 and #542. -* Several fixes for mingw plaform. Thanks to Biswapriyo Nath. See PR #540 and #543. +* Several fixes for mingw platform. Thanks to Biswapriyo Nath. See PR #540 and #543. Changes from 2.10.0 to 2.10.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/CMakeLists.txt new/c-blosc2-2.10.5/blosc/CMakeLists.txt --- old/c-blosc2-2.10.2/blosc/CMakeLists.txt 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/CMakeLists.txt 2023-10-05 18:10:31.000000000 +0200 @@ -165,28 +165,22 @@ endif() endif() -set(CMAKE_THREAD_PREFER_PTHREAD TRUE) # pre 3.1 -set(THREADS_PREFER_PTHREAD_FLAG TRUE) # CMake 3.1+ -if(WIN32) - # try to use the system library - find_package(Threads) - if(NOT Threads_FOUND) - message(STATUS "using the internal pthread library for win32 systems.") - list(APPEND SOURCES blosc/win32/pthread.c) - else() - if(CMAKE_VERSION VERSION_LESS 3.1) - set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT}) - else() - set(LIBS ${LIBS} Threads::Threads) - endif() - endif() -else() - find_package(Threads REQUIRED) +# Threads +if(HAVE_THREADS) if(CMAKE_VERSION VERSION_LESS 3.1) set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT}) else() set(LIBS ${LIBS} Threads::Threads) endif() +elseif(WIN32) + message(STATUS "using the internal pthread library for win32 systems.") + list(APPEND SOURCES blosc/win32/pthread.c) +else() + message(FATAL_ERROR "Threads required but not found.") +endif() + +# dlopen/dlclose +if(NOT WIN32) set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/blosc-private.h new/c-blosc2-2.10.5/blosc/blosc-private.h --- old/c-blosc2-2.10.2/blosc/blosc-private.h 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/blosc-private.h 2023-10-05 18:10:31.000000000 +0200 @@ -201,6 +201,7 @@ }; static inline void *dlopen (const char *filename, int flags) { + BLOSC_UNUSED_PARAM(flags); HINSTANCE hInst; hInst = LoadLibrary(filename); if (hInst==NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/blosc2.c new/c-blosc2-2.10.5/blosc/blosc2.c --- old/c-blosc2-2.10.2/blosc/blosc2.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/blosc2.c 2023-10-05 18:10:31.000000000 +0200 @@ -2179,9 +2179,13 @@ context->splitmode = splitmode; /* tuner some compression parameters */ context->blocksize = (int32_t)blocksize; + int rc = 0; if (context->tuner_params != NULL) { if (context->tuner_id < BLOSC_LAST_TUNER && context->tuner_id == BLOSC_STUNE) { - blosc_stune_next_cparams(context); + if (blosc_stune_next_cparams(context) < 0) { + BLOSC_TRACE_ERROR("Error in stune next_cparams func\n"); + return BLOSC2_ERROR_TUNER; + } } else { for (int i = 0; i < g_ntuners; ++i) { if (g_tuners[i].id == context->tuner_id) { @@ -2191,10 +2195,16 @@ return BLOSC2_ERROR_FAILURE; } } - g_tuners[i].next_cparams(context); + if (g_tuners[i].next_cparams(context) < 0) { + BLOSC_TRACE_ERROR("Error in tuner %d next_cparams func\n", context->tuner_id); + return BLOSC2_ERROR_TUNER; + } if (g_tuners[i].id == BLOSC_BTUNE && context->blocksize == 0) { // Call stune for initializing blocksize - blosc_stune_next_blocksize(context); + if (blosc_stune_next_blocksize(context) < 0) { + BLOSC_TRACE_ERROR("Error in stune next_blocksize func\n"); + return BLOSC2_ERROR_TUNER; + } } goto urtunersuccess; } @@ -2204,7 +2214,7 @@ } } else { if (context->tuner_id < BLOSC_LAST_TUNER && context->tuner_id == BLOSC_STUNE) { - blosc_stune_next_blocksize(context); + rc = blosc_stune_next_blocksize(context); } else { for (int i = 0; i < g_ntuners; ++i) { if (g_tuners[i].id == context->tuner_id) { @@ -2214,7 +2224,7 @@ return BLOSC2_ERROR_FAILURE; } } - g_tuners[i].next_blocksize(context); + rc = g_tuners[i].next_blocksize(context); goto urtunersuccess; } } @@ -2223,6 +2233,11 @@ } } urtunersuccess:; + if (rc < 0) { + BLOSC_TRACE_ERROR("Error in tuner next_blocksize func\n"); + return BLOSC2_ERROR_TUNER; + } + /* Check buffer size limits */ if (srcsize > BLOSC2_MAX_BUFFERSIZE) { @@ -2504,8 +2519,9 @@ if (context->tuner_params != NULL) { blosc_set_timestamp(¤t); double ctime = blosc_elapsed_secs(last, current); + int rc; if (context->tuner_id < BLOSC_LAST_TUNER && context->tuner_id == BLOSC_STUNE) { - blosc_stune_update(context, ctime); + rc = blosc_stune_update(context, ctime); } else { for (int i = 0; i < g_ntuners; ++i) { if (g_tuners[i].id == context->tuner_id) { @@ -2515,7 +2531,7 @@ return BLOSC2_ERROR_FAILURE; } } - g_tuners[i].update(context, ctime); + rc = g_tuners[i].update(context, ctime); goto urtunersuccess; } } @@ -2523,6 +2539,10 @@ return BLOSC2_ERROR_INVALID_PARAM; urtunersuccess:; } + if (rc < 0) { + BLOSC_TRACE_ERROR("Error in tuner update func\n"); + return BLOSC2_ERROR_TUNER; + } } return ntbytes; @@ -2800,6 +2820,10 @@ cparams.nthreads = g_nthreads; cparams.splitmode = g_splitmode; cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } /* Do the actual compression */ result = blosc2_compress_ctx(cctx, src, srcsize, dest, destsize); /* Release context resources */ @@ -2940,6 +2964,10 @@ if (envvar != NULL) { dparams.nthreads = g_nthreads; dctx = blosc2_create_dctx(dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return BLOSC2_ERROR_NULL_POINTER; + } result = blosc2_decompress_ctx(dctx, src, srcsize, dest, destsize); blosc2_free_ctx(dctx); return result; @@ -4050,7 +4078,10 @@ return NULL; } } - g_tuners[i].init(cparams.tuner_params, context, NULL); + if (g_tuners[i].init(cparams.tuner_params, context, NULL) < 0) { + BLOSC_TRACE_ERROR("Error in user-defined tuner %d init function\n", cparams.tuner_id); + return NULL; + } goto urtunersuccess; } } @@ -4118,8 +4149,9 @@ #endif } if (context->tuner_params != NULL) { + int rc; if (context->tuner_id < BLOSC_LAST_TUNER && context->tuner_id == BLOSC_STUNE) { - blosc_stune_free(context); + rc = blosc_stune_free(context); } else { for (int i = 0; i < g_ntuners; ++i) { if (g_tuners[i].id == context->tuner_id) { @@ -4129,7 +4161,7 @@ return; } } - g_tuners[i].free(context); + rc = g_tuners[i].free(context); goto urtunersuccess; } } @@ -4137,6 +4169,10 @@ return; urtunersuccess:; } + if (rc < 0) { + BLOSC_TRACE_ERROR("Error in user-defined tuner free function\n"); + return; + } } if (context->prefilter != NULL) { my_free(context->preparams); @@ -4218,6 +4254,10 @@ blosc_header header; blosc2_context* context = blosc2_create_cctx(cparams); + if (context == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int error = initialize_context_compression( context, NULL, nbytes, dest, destsize, @@ -4261,6 +4301,10 @@ blosc_header header; blosc2_context* context = blosc2_create_cctx(cparams); + if (context == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int error = initialize_context_compression( context, NULL, nbytes, dest, destsize, context->clevel, context->filters, context->filters_meta, @@ -4303,6 +4347,10 @@ blosc_header header; blosc2_context* context = blosc2_create_cctx(cparams); + if (context == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int error = initialize_context_compression( context, NULL, nbytes, dest, destsize, @@ -4348,6 +4396,10 @@ blosc_header header; blosc2_context* context = blosc2_create_cctx(cparams); + if (context == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int error = initialize_context_compression( context, NULL, nbytes, dest, destsize, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/frame.c new/c-blosc2-2.10.5/blosc/frame.c --- old/c-blosc2-2.10.2/blosc/frame.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/frame.c 2023-10-05 18:10:31.000000000 +0200 @@ -961,6 +961,10 @@ // Compress the chunk of offsets off_chunk = malloc(off_nbytes + BLOSC2_MAX_OVERHEAD); blosc2_context *cctx = blosc2_create_cctx(BLOSC2_CPARAMS_DEFAULTS); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } cctx->typesize = sizeof(int64_t); off_cbytes = blosc2_compress_ctx(cctx, data_tmp, off_nbytes, off_chunk, off_nbytes + BLOSC2_MAX_OVERHEAD); @@ -1191,6 +1195,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); @@ -1635,11 +1643,12 @@ char* eframe_name = malloc(strlen(frame->urlpath) + strlen("/chunks.b2frame") + 1); sprintf(eframe_name, "%s/chunks.b2frame", frame->urlpath); fp = io_cb->open(eframe_name, "rb", frame->schunk->storage->io->params); - free(eframe_name); if (fp == NULL) { BLOSC_TRACE_ERROR("Error opening file in: %s", eframe_name); + free(eframe_name); return BLOSC2_ERROR_FILE_OPEN; } + free(eframe_name); io_cb->seek(fp, trailer_offset, SEEK_SET); } else { @@ -1745,9 +1754,17 @@ blosc2_cparams *cparams; blosc2_schunk_get_cparams(schunk, &cparams); schunk->cctx = blosc2_create_cctx(*cparams); + if (schunk->cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return NULL; + } blosc2_dparams *dparams; blosc2_schunk_get_dparams(schunk, &dparams); schunk->dctx = blosc2_create_dctx(*dparams); + if (schunk->dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } blosc2_storage storage = {.contiguous = copy ? false : true}; schunk->storage = get_new_storage(&storage, cparams, dparams, udio); free(cparams); @@ -1776,6 +1793,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int64_t* offsets = (int64_t *) malloc((size_t)nchunks * sizeof(int64_t)); int32_t off_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, (int32_t)(nchunks * sizeof(int64_t))); @@ -2623,6 +2644,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); @@ -2679,6 +2704,10 @@ cparams.nthreads = 4; // 4 threads seems a decent default for nowadays CPUs cparams.compcode = BLOSC_BLOSCLZ; blosc2_context* cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return NULL; + } cctx->typesize = sizeof(int64_t); // override a possible BLOSC_TYPESIZE env variable (or chaos may appear) void* off_chunk = malloc((size_t)off_nbytes + BLOSC2_MAX_OVERHEAD); int32_t new_off_cbytes = blosc2_compress_ctx(cctx, offsets, off_nbytes, @@ -2827,6 +2856,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); if (prev_nbytes < 0) { @@ -2888,6 +2921,10 @@ cparams.nthreads = 4; // 4 threads seems a decent default for nowadays CPUs cparams.compcode = BLOSC_BLOSCLZ; blosc2_context* cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return NULL; + } void* off_chunk = malloc((size_t)off_nbytes + BLOSC2_MAX_OVERHEAD); int32_t new_off_cbytes = blosc2_compress_ctx(cctx, offsets, off_nbytes, off_chunk, off_nbytes + BLOSC2_MAX_OVERHEAD); @@ -3042,6 +3079,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); if (prev_nbytes < 0) { @@ -3138,6 +3179,10 @@ cparams.nthreads = 4; // 4 threads seems a decent default for nowadays CPUs cparams.compcode = BLOSC_BLOSCLZ; blosc2_context* cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return NULL; + } void* off_chunk = malloc((size_t)off_nbytes + BLOSC2_MAX_OVERHEAD); int32_t new_off_cbytes = blosc2_compress_ctx(cctx, offsets, off_nbytes, off_chunk, off_nbytes + BLOSC2_MAX_OVERHEAD); @@ -3277,6 +3322,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return NULL; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); if (prev_nbytes < 0) { @@ -3300,6 +3349,10 @@ cparams.nthreads = 4; // 4 threads seems a decent default for nowadays CPUs cparams.compcode = BLOSC_BLOSCLZ; blosc2_context* cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return NULL; + } void* off_chunk = malloc((size_t)off_nbytes + BLOSC2_MAX_OVERHEAD); int32_t new_off_cbytes = blosc2_compress_ctx(cctx, offsets, off_nbytes - (int32_t)sizeof(int64_t), off_chunk, off_nbytes + BLOSC2_MAX_OVERHEAD); @@ -3435,6 +3488,10 @@ // Decompress offsets blosc2_dparams off_dparams = BLOSC2_DPARAMS_DEFAULTS; blosc2_context *dctx = blosc2_create_dctx(off_dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int32_t prev_nbytes = blosc2_decompress_ctx(dctx, coffsets, coffsets_cbytes, offsets, off_nbytes); blosc2_free_ctx(dctx); @@ -3461,6 +3518,10 @@ cparams.nthreads = 4; // 4 threads seems a decent default for nowadays CPUs cparams.compcode = BLOSC_BLOSCLZ; blosc2_context* cctx = blosc2_create_cctx(cparams); + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } void* off_chunk = malloc((size_t)off_nbytes + BLOSC2_MAX_OVERHEAD); int32_t new_off_cbytes = blosc2_compress_ctx(cctx, offsets, off_nbytes, off_chunk, off_nbytes + BLOSC2_MAX_OVERHEAD); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/schunk.c new/c-blosc2-2.10.5/blosc/schunk.c --- old/c-blosc2-2.10.2/blosc/schunk.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/schunk.c 2023-10-05 18:10:31.000000000 +0200 @@ -73,7 +73,7 @@ } -void update_schunk_properties(struct blosc2_schunk* schunk) { +int update_schunk_properties(struct blosc2_schunk* schunk) { blosc2_cparams* cparams = schunk->storage->cparams; blosc2_dparams* dparams = schunk->storage->dparams; @@ -99,6 +99,10 @@ } cparams->schunk = schunk; schunk->cctx = blosc2_create_cctx(*cparams); + if (schunk->cctx == NULL) { + BLOSC_TRACE_ERROR("Could not create compression ctx"); + return BLOSC2_ERROR_NULL_POINTER; + } /* The decompression context */ if (schunk->dctx != NULL) { @@ -106,6 +110,12 @@ } dparams->schunk = schunk; schunk->dctx = blosc2_create_dctx(*dparams); + if (schunk->dctx == NULL) { + BLOSC_TRACE_ERROR("Could not create decompression ctx"); + return BLOSC2_ERROR_NULL_POINTER; + } + + return BLOSC2_ERROR_SUCCESS; } @@ -132,27 +142,10 @@ } // ...and update internal properties - update_schunk_properties(schunk); - - if (schunk->cctx->tuner_id < BLOSC_LAST_TUNER && schunk->cctx->tuner_id == BLOSC_STUNE) { - blosc_stune_init(schunk->storage->cparams->tuner_params, schunk->cctx, schunk->dctx); - } else { - for (int i = 0; i < g_ntuners; ++i) { - if (g_tuners[i].id == schunk->cctx->tuner_id) { - if (g_tuners[i].init == NULL) { - if (fill_tuner(&g_tuners[i]) < 0) { - BLOSC_TRACE_ERROR("Could not load tuner %d.", g_tuners[i].id); - return NULL; - } - } - g_tuners[i].init(schunk->storage->cparams->tuner_params, schunk->cctx, schunk->dctx); - goto urtunersuccess; - } - } - BLOSC_TRACE_ERROR("User-defined tuner %d not found\n", schunk->cctx->tuner_id); + if (update_schunk_properties(schunk) < 0) { + BLOSC_TRACE_ERROR("Error when updating schunk properties"); return NULL; } - urtunersuccess:; if (!storage->contiguous && storage->urlpath != NULL){ char* urlpath; @@ -1600,6 +1593,10 @@ } else { cctx = blosc2_create_cctx(BLOSC2_CPARAMS_DEFAULTS); } + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int csize = blosc2_compress_ctx(cctx, content, content_len, content_buf, content_len + BLOSC2_MAX_OVERHEAD); if (csize < 0) { @@ -1641,6 +1638,10 @@ *content_len = nbytes; *content = malloc((size_t) nbytes); blosc2_context *dctx = blosc2_create_dctx(*schunk->storage->dparams); + if (dctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the decompression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int nbytes_ = blosc2_decompress_ctx(dctx, meta->content, meta->content_len, *content, nbytes); blosc2_free_ctx(dctx); if (nbytes_ != nbytes) { @@ -1668,6 +1669,10 @@ } else { cctx = blosc2_create_cctx(BLOSC2_CPARAMS_DEFAULTS); } + if (cctx == NULL) { + BLOSC_TRACE_ERROR("Error while creating the compression context"); + return BLOSC2_ERROR_NULL_POINTER; + } int csize = blosc2_compress_ctx(cctx, content, content_len, content_buf, content_len + BLOSC2_MAX_OVERHEAD); if (csize < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/stune.c new/c-blosc2-2.10.5/blosc/stune.c --- old/c-blosc2-2.10.2/blosc/stune.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/stune.c 2023-10-05 18:10:31.000000000 +0200 @@ -34,14 +34,16 @@ } } -void blosc_stune_init(void * config, blosc2_context* cctx, blosc2_context* dctx) { +int blosc_stune_init(void * config, blosc2_context* cctx, blosc2_context* dctx) { BLOSC_UNUSED_PARAM(config); BLOSC_UNUSED_PARAM(cctx); BLOSC_UNUSED_PARAM(dctx); + + return BLOSC2_ERROR_SUCCESS; } // Set the automatic blocksize 0 to its real value -void blosc_stune_next_blocksize(blosc2_context *context) { +int blosc_stune_next_blocksize(blosc2_context *context) { int32_t clevel = context->clevel; int32_t typesize = context->typesize; int32_t nbytes = context->sourcesize; @@ -51,7 +53,7 @@ // Protection against very small buffers if (nbytes < typesize) { context->blocksize = 1; - return; + return BLOSC2_ERROR_SUCCESS; } if (user_blocksize) { @@ -106,7 +108,8 @@ } /* Now the blocksize for splittable codecs */ - if (clevel > 0 && split_block(context, typesize, blocksize)) { + int splitmode = split_block(context, typesize, blocksize); + if (clevel > 0 && splitmode) { // For performance reasons, do not exceed 256 KB (it must fit in L2 cache) switch (clevel) { case 1: @@ -120,6 +123,8 @@ blocksize = 64 * 1024; break; case 7: + blocksize = 128 * 1024; + break; case 8: blocksize = 256 * 1024; break; @@ -152,19 +157,29 @@ } context->blocksize = blocksize; + BLOSC_INFO("compcode: %d, clevel: %d, blocksize: %d, splitmode: %d, typesize: %d", + context->compcode, context->clevel, blocksize, splitmode, typesize); + + return BLOSC2_ERROR_SUCCESS; } -void blosc_stune_next_cparams(blosc2_context * context) { - BLOSC_UNUSED_PARAM(context); +int blosc_stune_next_cparams(blosc2_context * context) { + BLOSC_UNUSED_PARAM(context); + + return BLOSC2_ERROR_SUCCESS; } -void blosc_stune_update(blosc2_context * context, double ctime) { - BLOSC_UNUSED_PARAM(context); - BLOSC_UNUSED_PARAM(ctime); +int blosc_stune_update(blosc2_context * context, double ctime) { + BLOSC_UNUSED_PARAM(context); + BLOSC_UNUSED_PARAM(ctime); + + return BLOSC2_ERROR_SUCCESS; } -void blosc_stune_free(blosc2_context * context) { - BLOSC_UNUSED_PARAM(context); +int blosc_stune_free(blosc2_context * context) { + BLOSC_UNUSED_PARAM(context); + + return BLOSC2_ERROR_SUCCESS; } int split_block(blosc2_context *context, int32_t typesize, int32_t blocksize) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/blosc/stune.h new/c-blosc2-2.10.5/blosc/stune.h --- old/c-blosc2-2.10.2/blosc/stune.h 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/blosc/stune.h 2023-10-05 18:10:31.000000000 +0200 @@ -25,15 +25,15 @@ #define BLOSC_STUNE 0 -void blosc_stune_init(void * config, blosc2_context* cctx, blosc2_context* dctx); +int blosc_stune_init(void * config, blosc2_context* cctx, blosc2_context* dctx); -void blosc_stune_next_blocksize(blosc2_context * context); +int blosc_stune_next_blocksize(blosc2_context * context); -void blosc_stune_next_cparams(blosc2_context * context); +int blosc_stune_next_cparams(blosc2_context * context); -void blosc_stune_update(blosc2_context * context, double ctime); +int blosc_stune_update(blosc2_context * context, double ctime); -void blosc_stune_free(blosc2_context * context); +int blosc_stune_free(blosc2_context * context); /* Conditions for splitting a block before compressing with a codec. */ int split_block(blosc2_context *context, int32_t typesize, int32_t blocksize); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/examples/CMakeLists.txt new/c-blosc2-2.10.5/examples/CMakeLists.txt --- old/c-blosc2-2.10.2/examples/CMakeLists.txt 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/examples/CMakeLists.txt 2023-10-05 18:10:31.000000000 +0200 @@ -1,7 +1,7 @@ # Examples with correspondingly named source files set(EXAMPLES contexts instrument_codec delta_schunk_ex multithread simple frame_metalayers noinit find_roots schunk_simple frame_simple schunk_postfilter urcodecs urfilters frame_vlmetalayers - sframe_simple frame_backed_schunk compress_file frame_offset frame_roundtrip get_set_slice) + sframe_simple frame_backed_schunk compress_file frame_offset frame_roundtrip get_set_slice get_blocksize) add_subdirectory(b2nd) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/examples/get_blocksize.c new/c-blosc2-2.10.5/examples/get_blocksize.c --- old/c-blosc2-2.10.2/examples/get_blocksize.c 1970-01-01 01:00:00.000000000 +0100 +++ new/c-blosc2-2.10.5/examples/get_blocksize.c 2023-10-05 18:10:31.000000000 +0200 @@ -0,0 +1,72 @@ +/* + Copyright (c) 2021 The Blosc Development Team <[email protected]> + https://blosc.org + License: BSD 3-Clause (see LICENSE.txt) + + Example program demonstrating the use of a Blosc from C code. + + To compile this program: + + $ gcc -O get_blocksize.c -o get_blocksize -lblosc2 + + To run: + + $ ./get_blocksize + Blosc version info: 2.10.3.dev ($Date:: 2023-08-19 #$) + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 16384 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 131072 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 65536 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 131072 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 262144 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 262144 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 524288 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 1048576 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 524288 + Compression: 10000000 -> 32 (312500.0x) + osize, csize, blocksize: 10000000, 32, 2097152 + + Process finished with exit code 0 + +*/ + +#include <stdio.h> +#include "blosc2.h" + + +int main(void) { + blosc2_init(); + + static uint8_t data_dest[BLOSC2_MAX_OVERHEAD]; + blosc2_cparams cparams = BLOSC2_CPARAMS_DEFAULTS; + cparams.typesize = sizeof(float); + cparams.compcode = BLOSC_ZSTD; + + printf("Blosc version info: %s (%s)\n", + BLOSC2_VERSION_STRING, BLOSC2_VERSION_DATE); + + /* Do the actual compression */ + for (int clevel=0; clevel < 10; clevel++) { + cparams.clevel = clevel; + cparams.splitmode = clevel % 2; + int isize = 10 * 1000 * 1000; + int osize, csize, blocksize; + csize = blosc2_chunk_zeros(cparams, isize, data_dest, BLOSC2_MAX_OVERHEAD); + printf("Compression: %d -> %d (%.1fx)\n", isize, csize, (1. * isize) / csize); + + BLOSC_ERROR(blosc2_cbuffer_sizes(data_dest, &osize, &csize, &blocksize)); + printf("osize, csize, blocksize: %d, %d, %d\n", osize, csize, blocksize); + } + + blosc2_destroy(); + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/include/blosc2/blosc2-export.h new/c-blosc2-2.10.5/include/blosc2/blosc2-export.h --- old/c-blosc2-2.10.2/include/blosc2/blosc2-export.h 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/include/blosc2/blosc2-export.h 2023-10-05 18:10:31.000000000 +0200 @@ -33,11 +33,11 @@ #define BLOSC_EXPORT #endif /* defined(BLOSC_SHARED_LIBRARY) */ -#if defined(__GNUC__) || defined(__clang__) +#if (defined(__GNUC__) || defined(__clang__)) && !defined(__MINGW32__) #define BLOSC_NO_EXPORT __attribute__((visibility("hidden"))) #else #define BLOSC_NO_EXPORT -#endif /* defined(__GNUC__) || defined(__clang__) */ +#endif /* (defined(__GNUC__) || defined(__clang__)) && !defined(__MINGW32__) */ /* When testing, export everything to make it easier to implement tests. */ #if defined(BLOSC_TESTING) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/include/blosc2/codecs-registry.h new/c-blosc2-2.10.5/include/blosc2/codecs-registry.h --- old/c-blosc2-2.10.2/include/blosc2/codecs-registry.h 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/include/blosc2/codecs-registry.h 2023-10-05 18:10:31.000000000 +0200 @@ -22,6 +22,7 @@ BLOSC_CODEC_ZFP_FIXED_ACCURACY = 33, BLOSC_CODEC_ZFP_FIXED_PRECISION = 34, BLOSC_CODEC_ZFP_FIXED_RATE = 35, + BLOSC_CODEC_OPENHTJ2K = 36, }; void register_codecs(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/include/blosc2.h new/c-blosc2-2.10.5/include/blosc2.h --- old/c-blosc2-2.10.2/include/blosc2.h 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/include/blosc2.h 2023-10-05 18:10:31.000000000 +0200 @@ -83,10 +83,10 @@ /* Version numbers */ #define BLOSC2_VERSION_MAJOR 2 /* for major interface/format changes */ #define BLOSC2_VERSION_MINOR 10 /* for minor interface/format changes */ -#define BLOSC2_VERSION_RELEASE 2 /* for tweaks, bug-fixes, or development */ +#define BLOSC2_VERSION_RELEASE 5 /* for tweaks, bug-fixes, or development */ -#define BLOSC2_VERSION_STRING "2.10.2" /* string version. Sync with above! */ -#define BLOSC2_VERSION_DATE "$Date:: 2023-08-19 #$" /* date version */ +#define BLOSC2_VERSION_STRING "2.10.5" /* string version. Sync with above! */ +#define BLOSC2_VERSION_DATE "$Date:: 2023-10-05 #$" /* date version */ /* The maximum number of dimensions for Blosc2 NDim arrays */ @@ -121,6 +121,13 @@ } \ } while (0) +#define BLOSC_INFO(msg, ...) \ + do { \ + const char *__e = getenv("BLOSC_INFO"); \ + if (!__e) { break; } \ + fprintf(stderr, "[INFO] - " msg "\n", ##__VA_ARGS__); \ + } while(0) + /* The VERSION_FORMAT symbols below should be just 1-byte long */ enum { @@ -287,7 +294,7 @@ BLOSC2_GLOBAL_REGISTERED_CODECS_START = 32, BLOSC2_GLOBAL_REGISTERED_CODECS_STOP = 159, //!< Blosc-registered codecs must be between 31 - 159. - BLOSC2_GLOBAL_REGISTERED_CODECS = 1, + BLOSC2_GLOBAL_REGISTERED_CODECS = 5, //!< Number of Blosc-registered codecs at the moment. BLOSC2_USER_REGISTERED_CODECS_START = 160, BLOSC2_USER_REGISTERED_CODECS_STOP = 255, @@ -462,6 +469,7 @@ BLOSC2_ERROR_INVALID_INDEX = -33, //!< Invalid index BLOSC2_ERROR_METALAYER_NOT_FOUND = -34, //!< Metalayer has not been found BLOSC2_ERROR_MAX_BUFSIZE_EXCEEDED = -35, //!< Max buffer size exceeded + BLOSC2_ERROR_TUNER = -36, //!< Tuner failure }; @@ -1077,15 +1085,15 @@ typedef struct blosc2_context_s blosc2_context; /* opaque type */ typedef struct { - void (*init)(void * config, blosc2_context* cctx, blosc2_context* dctx); + int (*init)(void * config, blosc2_context* cctx, blosc2_context* dctx); //!< Initialize tuner. Keep in mind dctx may be NULL. This should memcpy the cctx->tuner_params. - void (*next_blocksize)(blosc2_context * context); + int (*next_blocksize)(blosc2_context * context); //!< Only compute the next blocksize. Only it is executed if tuner is not initialized. - void (*next_cparams)(blosc2_context * context); + int (*next_cparams)(blosc2_context * context); //!< Compute the next cparams. Only is executed if tuner is initialized. - void (*update)(blosc2_context * context, double ctime); + int (*update)(blosc2_context * context, double ctime); //!< Update the tuner parameters. - void (*free)(blosc2_context * context); + int (*free)(blosc2_context * context); //!< Free the tuner. int id; //!< The tuner id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/codecs-registry.c new/c-blosc2-2.10.5/plugins/codecs/codecs-registry.c --- old/c-blosc2-2.10.2/plugins/codecs/codecs-registry.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/codecs-registry.c 2023-10-05 18:10:31.000000000 +0200 @@ -47,4 +47,13 @@ zfp_rate.decoder = &zfp_rate_decompress; zfp_rate.compname = "zfp_rate"; register_codec_private(&zfp_rate); + + blosc2_codec openhtj2k; + openhtj2k.compcode = BLOSC_CODEC_OPENHTJ2K; + openhtj2k.version = 1; + openhtj2k.complib = BLOSC_CODEC_OPENHTJ2K; + openhtj2k.encoder = NULL; + openhtj2k.decoder = NULL; + openhtj2k.compname = "openhtj2k"; + register_codec_private(&openhtj2k); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/ndlz/test_ndlz.c new/c-blosc2-2.10.5/plugins/codecs/ndlz/test_ndlz.c --- old/c-blosc2-2.10.2/plugins/codecs/ndlz/test_ndlz.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/ndlz/test_ndlz.c 2023-10-05 18:10:31.000000000 +0200 @@ -309,7 +309,7 @@ int main(void) { int result; - blosc2_init(); // this is mandatory for initiallizing the plugin mechanism + blosc2_init(); // this is mandatory for initializing the plugin mechanism result = rand_(); printf("rand: %d obtained \n \n", result); if (result < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_acc_float.c new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_acc_float.c --- old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_acc_float.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_acc_float.c 2023-10-05 18:10:31.000000000 +0200 @@ -286,7 +286,7 @@ int main(void) { int result; - blosc2_init(); // this is mandatory for initiallizing the plugin mechanism + blosc2_init(); // this is mandatory for initializing the plugin mechanism result = float_cyclic(); printf("float_cyclic: %d obtained \n \n", result); if (result < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_prec_float.c new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_prec_float.c --- old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_prec_float.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_prec_float.c 2023-10-05 18:10:31.000000000 +0200 @@ -298,7 +298,7 @@ int main(void) { int result; - blosc2_init(); // this is mandatory for initiallizing the plugin mechanism + blosc2_init(); // this is mandatory for initializing the plugin mechanism result = float_cyclic(); printf("float_cyclic: %d obtained \n \n", result); if (result < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_rate_float.c new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_rate_float.c --- old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_rate_float.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_rate_float.c 2023-10-05 18:10:31.000000000 +0200 @@ -309,7 +309,7 @@ int main(void) { int result; - blosc2_init(); // this is mandatory for initiallizing the plugin mechanism + blosc2_init(); // this is mandatory for initializing the plugin mechanism result = float_cyclic(); printf("float_cyclic: %d obtained \n \n", result); if (result <= 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_rate_getitem.c new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_rate_getitem.c --- old/c-blosc2-2.10.2/plugins/codecs/zfp/test_zfp_rate_getitem.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/plugins/codecs/zfp/test_zfp_rate_getitem.c 2023-10-05 18:10:31.000000000 +0200 @@ -334,7 +334,7 @@ int main(void) { int result; - blosc2_init(); // this is mandatory for initiallizing the plugin mechanism + blosc2_init(); // this is mandatory for initializing the plugin mechanism printf("float_cyclic: "); result = float_cyclic(); if (result < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c-blosc2-2.10.2/tests/test_contexts.c new/c-blosc2-2.10.5/tests/test_contexts.c --- old/c-blosc2-2.10.2/tests/test_contexts.c 2023-08-19 14:08:03.000000000 +0200 +++ new/c-blosc2-2.10.5/tests/test_contexts.c 2023-10-05 18:10:31.000000000 +0200 @@ -79,7 +79,7 @@ dctx = blosc2_create_dctx(dparams); blosc2_dparams dparams2 = {0}; - blosc2_ctx_get_dparams(cctx, &dparams2); + blosc2_ctx_get_dparams(dctx, &dparams2); if (dparams2.nthreads != dparams.nthreads) { printf("Nthreads are not equal!"); ++++++ c-blosc2-pr563-armv7l-option.patch ++++++ diff -ur c-blosc2-2.10.5.orig/blosc/CMakeLists.txt c-blosc2-2.10.5/blosc/CMakeLists.txt --- c-blosc2-2.10.5.orig/blosc/CMakeLists.txt 2023-10-14 13:06:44.581157304 +0200 +++ c-blosc2-2.10.5/blosc/CMakeLists.txt 2023-10-14 13:19:19.589300306 +0200 @@ -354,10 +354,10 @@ # Only armv7l needs special -mfpu=neon flag; aarch64 doesn't. set_source_files_properties( shuffle-neon.c bitshuffle-neon.c - PROPERTIES COMPILE_OPTIONS "-mfpu=neon -flax-vector-conversions") + PROPERTIES COMPILE_OPTIONS "-mfpu=neon;-flax-vector-conversions") set_property( SOURCE shuffle.c - APPEND PROPERTY COMPILE_OPTIONS "-mfpu=neon -flax-vector-conversions") + APPEND PROPERTY COMPILE_OPTIONS "-mfpu=neon;-flax-vector-conversions") endif() # Define a symbol for the shuffle-dispatch implementation # so it knows NEON is supported even though that file is
