pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/hyperscan



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Dec 29 14:56:39 UTC 2024

Modified Files:
        pkgsrc/devel/hyperscan: Makefile PLIST buildlink3.mk distinfo
        pkgsrc/devel/hyperscan/patches: patch-CMakeLists.txt
Added Files:
        pkgsrc/devel/hyperscan/patches: patch-chimera_CMakeLists.txt
            patch-chimera_ch__runtime.c
Removed Files:
        pkgsrc/devel/hyperscan/patches: patch-src_nfa_limex__compile.cpp

Log Message:
hyperscan: updated to 5.4.2

5.4.2

Roll back bugfix for github issue 350: Besides using scratch for
corresponding database, Hyperscan also allows user to use larger scratch
allocated for another database. Users can leverage this property to achieve
safe scratch usage in multi-database scenarios. Behaviors beyond these are
discouraged and results are undefined.
Fix hsdump issue due to invalid nfa type.

5.4.1

The Intel Hyperscan team is pleased to provide a bug fix release to our open source library.
Intel also maintains an upgraded version available through your Intel sales representative.
Bugfix for issue 184: fix random char value of UTF-8.
Bugfix for issue 291: bypass logical combination flag in hs_expression_info().
Bugfix for issue 292: fix build error due to libc symbol parsing.
Bugfix for issue 302/304: add empty string check for pure literal API.
Bugfix for issue 303: fix unknown instruction error in pure literal API.
Bugfix for issue 303: avoid memory leak in stream close stage.
Bugfix for issue 305: fix assertion failure in DFA construction.
Bugfix for issue 317: fix aligned allocator segment faults.
Bugfix for issue 350: add quick validity check for scratch.
Bugfix for issue 359: fix glibc-2.34 stack size issue.
Bugfix for issue 360: fix SKIP flag issue in chimera.
Bugfix for issue 362: fix one cotec check corner issue in UTF-8 validation.
Fix other compile issues.

5.4.0

Improvement on literal matcher "Fat Teddy" performance, including support for Intel(R) AVX-512 Vector Byte Manipulation Instructions (Intel(R) AVX-512 VBMI).
Introduce a new 32-state shuffle-based DFA engine ("Sheng32"). This improves scanning performance by leveraging AVX-512 VBMI.
Introduce a new 64-state shuffle-based DFA engine ("Sheng64"). This improves scanning performance by leveraging AVX-512 VBMI.
Introduce a new shuffle-based hybrid DFA engine ("McSheng64"). This improves scanning performance by leveraging AVX-512 VBMI.
Improvement on exceptional state handling performance for LimEx NFA, including support for AVX-512 VBMI.
Improvement on lookaround performance with new models, including support for AVX-512.
Improvement on DFA state space efficiency.
Optimization on decision of NFA/DFA generation.
hsbench: add CSV dump support for hsbench.
Bugfix for cmake error on Icelake under release mode.
Bugfix in find_vertices_in_cycles() to avoid self-loop checking in SCC.
Bugfix for issue 270: fix return value handling in chimera.
Bugfix for issue 284: use correct free function in logical combination.
Add BUILD_EXAMPLES cmake option to enable example code compilation.
Some typo fixing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/hyperscan/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/hyperscan/PLIST \
    pkgsrc/devel/hyperscan/buildlink3.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/hyperscan/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/hyperscan/patches/patch-chimera_CMakeLists.txt \
    pkgsrc/devel/hyperscan/patches/patch-chimera_ch__runtime.c
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/devel/hyperscan/patches/patch-src_nfa_limex__compile.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/hyperscan/Makefile
diff -u pkgsrc/devel/hyperscan/Makefile:1.22 pkgsrc/devel/hyperscan/Makefile:1.23
--- pkgsrc/devel/hyperscan/Makefile:1.22        Tue Dec  3 19:57:51 2024
+++ pkgsrc/devel/hyperscan/Makefile     Sun Dec 29 14:56:38 2024
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.22 2024/12/03 19:57:51 minskim Exp $
+# $NetBSD: Makefile,v 1.23 2024/12/29 14:56:38 adam Exp $
 
-DISTNAME=      hyperscan-5.0.0
-PKGREVISION=   12
+DISTNAME=      hyperscan-5.4.2
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=intel/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -15,13 +14,17 @@ TOOL_DEPENDS+=      ragel-[0-9]*:../../devel/
 
 ONLY_FOR_PLATFORM=     *-*-i386 *-*-x86_64
 
-USE_CMAKE=             yes
-USE_LANGUAGES=         c99 c++
-USE_CXX_FEATURES+=     c++11
+USE_CC_FEATURES=       c99
+USE_CXX_FEATURES=      c++11
+USE_LANGUAGES=         c c++
 USE_TOOLS+=            pkg-config
 PYTHON_FOR_BUILD_ONLY= yes
 
-CMAKE_CONFIGURE_ARGS+=         -DBUILD_SHARED_LIBS=ON
+CMAKE_CONFIGURE_ARGS+= -DBUILD_EXAMPLES=OFF
+# Static libs are needed to build Chimera.
+# Chimera is required for py-hyperscan.
+CMAKE_CONFIGURE_ARGS+= -DBUILD_STATIC_AND_SHARED=ON
+PKGCONFIG_OVERRIDE+=   chimera/libch.pc.in
 PKGCONFIG_OVERRIDE+=   libhs.pc.in
 
 .include "../../mk/bsd.prefs.mk"
@@ -32,5 +35,7 @@ CFLAGS+=      -march=core2
 
 .include "../../databases/sqlite3/buildlink3.mk"
 .include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/pcre/buildlink3.mk"
 .include "../../lang/python/tool.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/hyperscan/PLIST
diff -u pkgsrc/devel/hyperscan/PLIST:1.3 pkgsrc/devel/hyperscan/PLIST:1.4
--- pkgsrc/devel/hyperscan/PLIST:1.3    Wed Jul 25 00:26:30 2018
+++ pkgsrc/devel/hyperscan/PLIST        Sun Dec 29 14:56:38 2024
@@ -1,12 +1,20 @@
-@comment $NetBSD: PLIST,v 1.3 2018/07/25 00:26:30 minskim Exp $
+@comment $NetBSD: PLIST,v 1.4 2024/12/29 14:56:38 adam Exp $
+include/hs/ch.h
+include/hs/ch_common.h
+include/hs/ch_compile.h
+include/hs/ch_runtime.h
 include/hs/hs.h
 include/hs/hs_common.h
 include/hs/hs_compile.h
 include/hs/hs_runtime.h
+lib/libchimera.a
+lib/libhs.a
 lib/libhs.so
-lib/libhs.so.5
 lib/libhs.so.${PKGVERSION}
+lib/libhs.so.5
+lib/libhs_runtime.a
 lib/libhs_runtime.so
-lib/libhs_runtime.so.5
 lib/libhs_runtime.so.${PKGVERSION}
+lib/libhs_runtime.so.5
+lib/pkgconfig/libch.pc
 lib/pkgconfig/libhs.pc
Index: pkgsrc/devel/hyperscan/buildlink3.mk
diff -u pkgsrc/devel/hyperscan/buildlink3.mk:1.3 pkgsrc/devel/hyperscan/buildlink3.mk:1.4
--- pkgsrc/devel/hyperscan/buildlink3.mk:1.3    Mon Aug 14 05:24:09 2023
+++ pkgsrc/devel/hyperscan/buildlink3.mk        Sun Dec 29 14:56:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2023/08/14 05:24:09 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2024/12/29 14:56:38 adam Exp $
 
 BUILDLINK_TREE+=       hyperscan
 
@@ -6,7 +6,7 @@ BUILDLINK_TREE+=        hyperscan
 HYPERSCAN_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.hyperscan+=      hyperscan>=5.0.0
-BUILDLINK_ABI_DEPENDS.hyperscan?=              hyperscan>=5.0.0nb7
+BUILDLINK_ABI_DEPENDS.hyperscan+=      hyperscan>=5.0.0nb7
 BUILDLINK_PKGSRCDIR.hyperscan?=                ../../devel/hyperscan
 
 .endif # HYPERSCAN_BUILDLINK3_MK

Index: pkgsrc/devel/hyperscan/distinfo
diff -u pkgsrc/devel/hyperscan/distinfo:1.7 pkgsrc/devel/hyperscan/distinfo:1.8
--- pkgsrc/devel/hyperscan/distinfo:1.7 Tue Oct 26 10:15:05 2021
+++ pkgsrc/devel/hyperscan/distinfo     Sun Dec 29 14:56:38 2024
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.7 2021/10/26 10:15:05 nia Exp $
+$NetBSD: distinfo,v 1.8 2024/12/29 14:56:38 adam Exp $
 
-BLAKE2s (hyperscan-5.0.0.tar.gz) = 5624dc6f9c72e6e10130250c8517f1f3709cbc52c9fbc56a89bfa99e4b00c9c8
-SHA512 (hyperscan-5.0.0.tar.gz) = 2a942832ab6908ea4b17342428188d635d1db0a57ac6452abbbcdadcf972be0174edeec67d03d925ce92d969c767e9933fdc636c4e3df0067aade659337692a5
-Size (hyperscan-5.0.0.tar.gz) = 1801219 bytes
-SHA1 (patch-CMakeLists.txt) = 6b6b8f4ed47132c2df593f108246ed129dd73240
-SHA1 (patch-src_nfa_limex__compile.cpp) = 7301935120e523e8e9490c3ccc1f37e9c9e5f317
+BLAKE2s (hyperscan-5.4.2.tar.gz) = 56eb9b80011ec253c3a2543d19ae3bb12d66b66d6be7a3942f798a3a1ec5430f
+SHA512 (hyperscan-5.4.2.tar.gz) = 328f21133161d16b36ebdc7f8b80a7afe7ca9e7e7433348e9bfa9acb5f3641522e8314beea1b219891f4e95f1392ff8036ebb87780fe808b8b4bd15a535e9509
+Size (hyperscan-5.4.2.tar.gz) = 1848851 bytes
+SHA1 (patch-CMakeLists.txt) = 09b5f2653d233faa10ed83c3a3def6ea66e4f3ce
+SHA1 (patch-chimera_CMakeLists.txt) = 8c762191adb5088a31e884ff0745f7c05995eb14
+SHA1 (patch-chimera_ch__runtime.c) = a3e89529a4397eeaea2db358f2676cf03e66a91e
 SHA1 (patch-src_util_popcount.h) = 3d30d412318c474c9d7a5b7fc45ea3148e6ed4b4
 SHA1 (patch-tools_hsbench_CMakeLists.txt) = 69ea565ee36811a632e8bc521901c4cdd0a91ca3
 SHA1 (patch-tools_hscollider_CMakeLists.txt) = ee22d83890ca7bf010dd751469d90dcb4930dd08

Index: pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt
diff -u pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt:1.4 pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt:1.5
--- pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt:1.4     Sun Nov 29 20:27:28 2020
+++ pkgsrc/devel/hyperscan/patches/patch-CMakeLists.txt Sun Dec 29 14:56:38 2024
@@ -1,13 +1,14 @@
-$NetBSD: patch-CMakeLists.txt,v 1.4 2020/11/29 20:27:28 nia Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.5 2024/12/29 14:56:38 adam Exp $
 
 Avoid conflicts with pkgsrc's CMAKE_MODULE_PATH override.
 Disable examples as they require Linux specific headers.
 Do not try to use -march/-mtune.
+Build Chimera without PCRE sources.
 
---- CMakeLists.txt.orig        2018-07-09 16:45:44.000000000 +0000
+--- CMakeLists.txt.orig        2023-04-19 09:34:39.000000000 +0000
 +++ CMakeLists.txt
-@@ -6,7 +6,6 @@ set (HS_MINOR_VERSION 0)
- set (HS_PATCH_VERSION 0)
+@@ -6,7 +6,6 @@ set (HS_MINOR_VERSION 4)
+ set (HS_PATCH_VERSION 2)
  set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION})
  
 -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
@@ -25,7 +26,7 @@ Do not try to use -march/-mtune.
  
  find_package(PkgConfig QUIET)
  
-@@ -68,7 +67,7 @@ include_directories(${PROJECT_SOURCE_DIR
+@@ -69,7 +68,7 @@ include_directories(${PROJECT_SOURCE_DIR
  include_directories(${PROJECT_BINARY_DIR})
  include_directories(SYSTEM include)
  
@@ -34,7 +35,7 @@ Do not try to use -march/-mtune.
  
  # -- make this work? set(python_ADDITIONAL_VERSIONS 2.7 2.6)
  find_package(PythonInterp)
-@@ -83,7 +82,7 @@ endif()
+@@ -84,7 +83,7 @@ endif()
  # allow for reproducible builds - python for portability
  if (DEFINED ENV{SOURCE_DATE_EPOCH})
        execute_process(
@@ -43,7 +44,7 @@ Do not try to use -march/-mtune.
            OUTPUT_VARIABLE BUILD_DATE
            OUTPUT_STRIP_TRAILING_WHITESPACE)
  else ()
-@@ -179,35 +178,6 @@ else()
+@@ -182,36 +181,6 @@ else()
          string(REGEX REPLACE "-O[^ ]*" "" CMAKE_CXX_FLAGS_${CONFIG} "${CMAKE_CXX_FLAGS_${CONFIG}}")
      endforeach ()
  
@@ -59,7 +60,9 @@ Do not try to use -march/-mtune.
 -        set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -march=native -mtune=native)
 -        execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS}
 -            OUTPUT_VARIABLE _GCC_OUTPUT)
--        string(REGEX REPLACE ".*march=[ \t]*([^ \n]*)[ \n].*" "\\1"
+-        string(FIND "${_GCC_OUTPUT}" "march" POS)
+-        string(SUBSTRING "${_GCC_OUTPUT}" ${POS} -1 _GCC_OUTPUT)
+-        string(REGEX REPLACE "march=[ \t]*([^ \n]*)[ \n].*" "\\1"
 -            GNUCC_ARCH "${_GCC_OUTPUT}")
 -
 -        # test the parsed flag
@@ -75,11 +78,10 @@ Do not try to use -march/-mtune.
 -    else ()
 -        set(TUNE_FLAG native)
 -    endif()
--
+ 
      # compiler version checks TODO: test more compilers
      if (CMAKE_COMPILER_IS_GNUCXX)
-         set(GNUCXX_MINVER "4.8.1")
-@@ -246,14 +216,6 @@ else()
+@@ -251,14 +220,6 @@ else()
          set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -DNDEBUG")
      endif()
  
@@ -94,7 +96,7 @@ Do not try to use -march/-mtune.
      if(CMAKE_COMPILER_IS_GNUCC)
          # spurious warnings?
          set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-array-bounds -Wno-maybe-uninitialized")
-@@ -320,7 +282,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+@@ -326,7 +287,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
          message (STATUS "Building the fat runtime requires the Unix Makefiles generator, or Ninja with CMake v3.0 or higher")
          set (FAT_RUNTIME_REQUISITES FALSE)
      else()
@@ -103,8 +105,8 @@ Do not try to use -march/-mtune.
          if (NOT HAS_C_ATTR_IFUNC)
              message(STATUS "Compiler does not support ifunc attribute, cannot build fat runtime")
              set (FAT_RUNTIME_REQUISITES FALSE)
-@@ -331,7 +293,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
-     CMAKE_DEPENDENT_OPTION(FAT_RUNTIME "Build a library that supports multiple microarchitecures" ${RELEASE_BUILD} "FAT_RUNTIME_REQUISITES" OFF)
+@@ -337,7 +298,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+     CMAKE_DEPENDENT_OPTION(FAT_RUNTIME "Build a library that supports multiple microarchitectures" ${RELEASE_BUILD} "FAT_RUNTIME_REQUISITES" OFF)
  endif ()
  
 -include (${CMAKE_MODULE_PATH}/arch.cmake)
@@ -112,16 +114,23 @@ Do not try to use -march/-mtune.
  
  # testing a builtin takes a little more work
  CHECK_C_SOURCE_COMPILES("void *aa_test(void *x) { return __builtin_assume_aligned(x, 16);}\nint main(void) { return 0; }" HAVE_CC_BUILTIN_ASSUME_ALIGNED)
-@@ -454,7 +416,7 @@ if (NOT WIN32)
+@@ -486,13 +447,13 @@ if (NOT WIN32)
  set(PCRE_REQUIRED_MAJOR_VERSION 8)
  set(PCRE_REQUIRED_MINOR_VERSION 41)
  set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION})
 -include (${CMAKE_MODULE_PATH}/pcre.cmake)
 +include (${PROJECT_SOURCE_DIR}/cmake/pcre.cmake)
  if (NOT CORRECT_PCRE_VERSION)
-     message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} not found")
+     message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} or above not found")
  endif()
-@@ -474,7 +436,7 @@ endif()
+ 
+ # we need static libs for Chimera - too much deep magic for shared libs
+-if (CORRECT_PCRE_VERSION AND PCRE_BUILD_SOURCE AND BUILD_STATIC_LIBS)
++if (CORRECT_PCRE_VERSION)
+     set(BUILD_CHIMERA TRUE)
+ endif()
+ 
+@@ -506,7 +467,7 @@ endif()
  endif()
  
  # do substitutions
@@ -130,16 +139,16 @@ Do not try to use -march/-mtune.
  configure_file(src/hs_version.h.in ${PROJECT_BINARY_DIR}/hs_version.h)
  
  if (NOT WIN32)
-@@ -506,7 +468,7 @@ if (WIN32)
+@@ -538,7 +499,7 @@ if (WIN32)
  set(PCRE_REQUIRED_MAJOR_VERSION 8)
  set(PCRE_REQUIRED_MINOR_VERSION 41)
  set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION})
 -include (${CMAKE_MODULE_PATH}/pcre.cmake)
 +include (${PROJECT_SOURCE_DIR}/cmake/pcre.cmake)
  if (NOT CORRECT_PCRE_VERSION)
-     message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} not found")
+     message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} or above not found")
  endif()
-@@ -1195,28 +1157,28 @@ else (FAT_RUNTIME)
+@@ -1230,28 +1191,28 @@ else (FAT_RUNTIME)
         list(APPEND RUNTIME_LIBS $<TARGET_OBJECTS:hs_exec_core2>)
         set_target_properties(hs_exec_core2 PROPERTIES
             COMPILE_FLAGS "-march=core2"
@@ -171,8 +180,8 @@ Do not try to use -march/-mtune.
 +               RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in"
                 )
         endif (BUILD_AVX512)
- 
-@@ -1251,21 +1213,21 @@ else (FAT_RUNTIME)
+        if (BUILD_AVX512VBMI)
+@@ -1294,21 +1255,21 @@ else (FAT_RUNTIME)
          set_target_properties(hs_exec_shared_core2 PROPERTIES
              COMPILE_FLAGS "-march=core2"
              POSITION_INDEPENDENT_CODE TRUE
@@ -197,7 +206,7 @@ Do not try to use -march/-mtune.
              )
  
          if (BUILD_AVX512)
-@@ -1274,7 +1236,7 @@ else (FAT_RUNTIME)
+@@ -1317,7 +1278,7 @@ else (FAT_RUNTIME)
              set_target_properties(hs_exec_shared_avx512 PROPERTIES
                  COMPILE_FLAGS "${SKYLAKE_FLAG}"
                  POSITION_INDEPENDENT_CODE TRUE
@@ -205,13 +214,4 @@ Do not try to use -march/-mtune.
 +                RULE_LAUNCH_COMPILE "${BUILD_WRAPPER} avx512 ${PROJECT_SOURCE_DIR}/cmake/keep.syms.in"
                  )
          endif (BUILD_AVX512)
-         add_library(hs_exec_common_shared OBJECT
-@@ -1367,8 +1329,3 @@ if (NOT BUILD_STATIC_LIBS)
-     # use shared lib without having to change all the targets
-     add_library(hs ALIAS hs_shared)
- endif ()
--
--
--if(NOT WIN32)
--    add_subdirectory(examples)
--endif()
+         if (BUILD_AVX512VBMI)

Added files:

Index: pkgsrc/devel/hyperscan/patches/patch-chimera_CMakeLists.txt
diff -u /dev/null pkgsrc/devel/hyperscan/patches/patch-chimera_CMakeLists.txt:1.1
--- /dev/null   Sun Dec 29 14:56:39 2024
+++ pkgsrc/devel/hyperscan/patches/patch-chimera_CMakeLists.txt Sun Dec 29 14:56:38 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-chimera_CMakeLists.txt,v 1.1 2024/12/29 14:56:38 adam Exp $
+
+Do not leak work dir in pkg-config file.
+
+--- chimera/CMakeLists.txt.orig        2024-12-29 14:09:56.883237585 +0000
++++ chimera/CMakeLists.txt
+@@ -41,7 +41,7 @@ if (NOT WIN32)
+             set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
+         endif()
+     endforeach()
+-    set(PRIVATE_LIBS "${PRIVATE_LIBS} -L${LIBDIR} -lpcre")
++    set(PRIVATE_LIBS "${PRIVATE_LIBS} -lpcre")
+ 
+     configure_file(libch.pc.in libch.pc @ONLY) # only replace @ quoted vars
+     install(FILES ${CMAKE_BINARY_DIR}/chimera/libch.pc
Index: pkgsrc/devel/hyperscan/patches/patch-chimera_ch__runtime.c
diff -u /dev/null pkgsrc/devel/hyperscan/patches/patch-chimera_ch__runtime.c:1.1
--- /dev/null   Sun Dec 29 14:56:39 2024
+++ pkgsrc/devel/hyperscan/patches/patch-chimera_ch__runtime.c  Sun Dec 29 14:56:38 2024
@@ -0,0 +1,32 @@
+$NetBSD: patch-chimera_ch__runtime.c,v 1.1 2024/12/29 14:56:38 adam Exp $
+
+Do not use PCRE's internal function.
+
+--- chimera/ch_runtime.c.orig  2024-12-29 12:38:10.000000000 +0000
++++ chimera/ch_runtime.c
+@@ -120,7 +120,7 @@ struct HybridContext {
+ };
+ 
+ // Internal PCRE func.
+-extern int _pcre_valid_utf(const unsigned char *, int, int *);
++//extern int _pcre_valid_utf(const unsigned char *, int, int *);
+ 
+ /** UTF-8 validity check. Returns >0 if the given region of the data is valid
+  * UTF-8, 0 otherwise. */
+@@ -138,11 +138,11 @@ char isValidUTF8(struct HybridContext *h
+ 
+     DEBUG_PRINTF("validating %d bytes\n", validate_len);
+ 
+-    int erroroffset = 0;
+-    if (_pcre_valid_utf(data, validate_len, &erroroffset)) {
+-        DEBUG_PRINTF("UTF8 invalid at offset %d\n", erroroffset);
+-        return 0;
+-    }
++    //int erroroffset = 0;
++    //if (_pcre_valid_utf(data, validate_len, &erroroffset)) {
++    //    DEBUG_PRINTF("UTF8 invalid at offset %d\n", erroroffset);
++    //    return 0;
++    //}
+ 
+     hyctx->valid_utf8_highwater = end;
+     return 1;



Home | Main Index | Thread Index | Old Index