Hyperscan release 5.1.1
by Wang, Xiang W
Hi all,
We have just released Hyperscan 5.1.1 on GitHub.
This is a bugfix release. A few things were discovered that required fixes after release 5.1.
>From the change log for this release:
[5.1.1]
- Add extra detection and handling when invalid rose programs are triggered.
- Bugfix for issue #136: fix CMake parsing of CPU architecture for GCC-9.
- Bugfix for issue #137: avoid file path impact on fat runtime build.
- Bugfix for issue #141: fix rose literal programs for multi-pattern
matching when no pattern ids are provided.
- Bugfix for issue #144: fix library install path in pkg-config files.
Thanks,
Xiang
3 years, 1 month
Access Violation using Hyperscan 5. on Windows
by Bobby Martin
It looks as if there's an access violation in Hyperscan. Can you help find
& fix it?
I made simple updates to the Hyperscan library to build a DLL for Windows.
When I compile the DLL using Release mode, it shows access violations in
FDR_EXEC_TEDDY when attempting a simple match.
To reproduce (replace BOOST_ROOT with your BOOST_ROOT):
git clone git@github.com:wurp/hyperscan.git
mkdir access-violation
cd access-violation
cmake -G "Visual Studio 15 2017 Win64" -DBUILD_SHARED_LIBS=ON
-DBOOST_ROOT:PATH=c:\CxCache\boost.1.67.0.0\lib\native\include ..
cmake --build . --config Release
bin\hscheck.exe
I put the code that evokes the AV in tools/hscheck/main.cpp. The crux of it
is this:
hs_database_t* pRegexDatabase = nullptr;
hs_compile_error_t *compile_err = nullptr;
hs_error_t hsError = hs_compile(
"Sample?Value",
0,
HS_MODE_BLOCK,
nullptr,
&pRegexDatabase,
&compile_err);
if (hsError != HS_SUCCESS)
{
printf("Dead 1\n");
exit(-2);
}
hs_scratch_t* pScratch = nullptr;
hsError = hs_alloc_scratch(pRegexDatabase, &pScratch);
if (hsError != HS_SUCCESS)
{
printf("Dead 2\n");
exit(-2);
}
bool matched = false;
printf("Scan 1\n");
hsError = hs_scan(
pRegexDatabase,
"Sample\?Value",
12,
0,
pScratch,
blowupEventHandler,
&matched);
if (hsError != HS_SUCCESS)
{
printf("Dead 3\n");
exit(-2);
}
printf("Scan 2\n");
hsError = hs_scan(
pRegexDatabase,
"SampleeValue",
12,
0,
pScratch,
blowupEventHandler,
&matched);
if (hsError != HS_SUCCESS)
{
printf("Dead 4\n");
exit(-2);
}
printf("good exit");
The output shows "Scan 1", but never shows "Scan 2" or any "Dead"/"good"
message.
Note that I see no AV when building with /MT (non-DLL runtime) nor when
compiling with /MDd (DLL runtime with debug info).
Thanks!
Bobby
3 years, 1 month