Whenever I enter the following searchstring in the find&replace dialogue in a document actually containing text which would be found by this string LibreOffice Writer hangs up / crashes. \{05(>|)(1|2|3|4|)\}([:alpha:]|[:space:]|_|\[|\]|\\|:|\?|\{(/|)0(1|2|4|6)(>|)(1|2|3|4|5|6|7|)(>|)(1|2|3|direkt|spaeter|passiv|)(>|)(1|2|eng|lose|)(: |)([:alpha:]|[:space:]|_|)+\}|.)+\{/05(>|)(1|2|3|4|)(: |)([:alpha:]|[:space:]|_|)+\} This is reproducable in any documents which contain matches. Like the following: {01>1}{02>1>2}{06>6}Nam liber{06>3} tempor cum soluta nobis eleifend{/06>3} option congue nihil imperdiet doming id quod mazim placerat facer possim assum.{04>3} Lorem ipsum dolor sit a{/06>6}met, consectetuer adipiscing elit,{05>1} sed diam nonummy nibh{/04>3} euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex{/05>1: Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis} ea commodo consequat. {/02>1>2} {/01>1}
Not a crash but a freeze (endless loop) in ICU's RegexMatcher::MatchChunkAt()
Reported upstream as https://ssl.icu-project.org/trac/ticket/10496
Seem they won't and we can't change anything. https://ssl.icu-project.org/trac/ticket/10496#comment:3
Adding some sort of "time limit" as described in https://ssl.icu-project.org/apiref/icu4c/uregex_8h.html#a7b42432bc279a11c8a5e2c83f767181d may help.
Or better https://ssl.icu-project.org/apiref/icu4c/classicu_1_1RegexMatcher.html#a6ebcfcab4fe6a38678c0291643a03a00 since we use an instance of RegexMatcher.
I'll give that a try.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d838ea200e7d6060d4a759616f9e1fcbf3c36c8e set a 23 enigma timeout at RegexMatcher, fdo#70627 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=12ebbb7e471d851eec940a47e6737c7c89d0f7f8&h=libreoffice-4-2 set a 23 enigma timeout at RegexMatcher, fdo#70627 It will be available in LibreOffice 4.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review for 4-1 as https://gerrit.libreoffice.org/6808
Note that this solution sets a timeout that, depending on processor speed, breaks the exponential run time after ~30-50 seconds returning "not found" even if theoretically there could be a match. For such rare patterns this appears to be a better solution than freezing the application for hours or days..
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b103d14aaac3d96f7b60ce1baa9c581a102a1e63&h=libreoffice-4-1 set a 23 enigma timeout at RegexMatcher, fdo#70627 It will be available in LibreOffice 4.1.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.