boostorg / boostorg/algorithm

boost::algorithm::split_regex hangs and consumes CPU on dangling alternatives

未关闭
#68 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
131
派生
117
PR 合并指标
30 天内没有已合并 PR

描述

I happened to typo a regex, and I noticed that `boost::algorithm::split_regex` started consuming a bunch of CPU. I don't know is this would have eventually caught itself and terminating. The regex in question was `;|`, and this appears to be true for any dangling `|`.

I'm a bit surprised that `boost::regex` allowed `;|` as valid, given split_regex's behavior.

Simple example up at https://gist.github.com/directionless/c38eb7dc216bcd93b40c3ecaf99f326e

I tested this on darwin with boost 1.67, and on linux with boost 1.65

(This was moved here from https://github.com/boostorg/regex/issues/76)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。