- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have a simple example below with which you can reproduce the problem:
#include "stdafx.h" #include <string> #include <regex> #define _IPP_SEQUENTIAL_STATIC #include "ipp/include/ippch.h" using std::tr1::regex; using std::tr1::smatch; using std::tr1::regex_match; int _tmain(int argc, _TCHAR* argv[]) { IppStatus status; std::string input; input += "/*!"; for (int i = 0; i < 40 * 1024; ++i) { // random data input += 'a' + (i % 26); } input += "*/"; const char* pattern = "\\/\\*\\!([\\s\\S]*)\\*\\/"; // std::regex example regex rx(pattern); smatch matches; regex_match(input, matches, rx); int regExpStateSize = 0; status = ippsRegExpGetSize(pattern, ®ExpStateSize); IppRegExpState* pRegExpState = (IppRegExpState*)malloc(regExpStateSize); int errOffs = 0; status = ippsRegExpInit(pattern, NULL, pRegExpState, &errOffs); IppRegExpFind find[2]; int numFind = 2; status = ippsRegExpFind_8u((const Ipp8u*)input.c_str(), input.length(), pRegExpState, find, &numFind); free(pRegExpState); return 0; }
Is this the expected behaviour or did I miss something?
I also played with RegExpSetMatchLimit. I tried a limit of 2, with that the stack overflow was gone, but it didn't match anything. So this is no solution for me.
Thanks, Slawa
IPP version information
Package ID: w_comp_lib_2016.2.180
Package Contents: Intel(R) Inspector XE 2016 Update 2
Build Number: 450824
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks Slawa, we see the similar results on our side too. We will check the problem and get back asap.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page