Skip to content

STL's std::regex_search(buffers, match, pattern) leads to stack overflow and segfault in Gramine #1383

Answered by dimakuv
dimakuv asked this question in Q&A
Discussion options

You must be logged in to vote

Solutions

  1. Set sys.stack.size = "1M" or a greater value.
  2. Use Boost because its implementation of regex-match is non-recursive on Linux: https://www.boost.org/doc/libs/1_82_0/libs/regex/doc/html/boost_regex/configuration/algorithm.html

Replies: 1 comment

Comment options

dimakuv
Jun 7, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by dimakuv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant