Summary: | Reproducible crash within clang when attempting to check Akonadi | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Jonathan Marten <jjm> |
Component: | general | Assignee: | Sergio Martins <smartins> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/sdk/clazy/commit/19f1254224b69cffd639b4a343866e7db2a469df | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Build log file |
Description
Jonathan Marten
2021-04-11 13:56:34 UTC
Created attachment 137505 [details]
Build log file
Sorry, the preprocessed source file (as requested by the LLVM crash report) is too big to attach here, but it is available if necessary. Simplifying the regexp in OldStyleConnect::VisitMacroExpands() as follows: - static regex rx(R"(Q_PRIVATE_SLOT\s*\((.*)\s*,\s*.*\s+(.*)\(.*)"); + static regex rx(R"(Q_PRIVATE_SLOT\s*\((.*),.*\s(.*)\(.*)"); seems to eliminate the crash. I don't know what sort of pattern the regexp is intended to match, but believe that the two regexps should be equivalent. For .*\s* the \s* will never match anything because everything will have been captured by the .* and for \s*.*\s+ the .* will match anything that the first \s* doesn't and the second \s+ will only match a single space. What would be really valuable would be a reproducible test case, trimming down your akonadi case and attach here, so I can work on it I've reproduced Git commit 19f1254224b69cffd639b4a343866e7db2a469df by Sergio Martins. Committed on 30/06/2021 at 23:17. Pushed by smartins into branch 'master'. old-style-connect: Simplify regexp, which also fixes a crash Simplification done by Jonathan Marten. I don't understand why it fixes the crash though, but at least it's not worse. Related: bug 438976 M +1 -1 src/checks/level2/old-style-connect.cpp https://invent.kde.org/sdk/clazy/commit/19f1254224b69cffd639b4a343866e7db2a469df |