[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Oliver Kellogg changed: What|Removed |Added CC||gabrav...@gmail.com --- Comment #7 from Oliver Kellogg --- *** Bug 461738 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Oliver Kellogg changed: What|Removed |Added Latest Commit|https://invent.kde.org/sdk/ |https://invent.kde.org/sdk/ |umbrello/commit/035c942f83e |umbrello/commit/ef7e41fe2c9 |0d8d39b31c531f237e8ccc08956 |9045a5fe6301c5aed92267a410d |56 |9c --- Comment #6 from Oliver Kellogg --- Git commit ef7e41fe2c99045a5fe6301c5aed92267a410d9c by Oliver Kellogg. Committed on 27/11/2022 at 20:32. Pushed by okellogg into branch 'master'. lib/cppparser/parser.cpp : Apply patch of comment #1 by Xuxu. Thanks. FIXED-IN: 2.36.80 (KDE releases 22.11.80) M +6-6lib/cppparser/parser.cpp https://invent.kde.org/sdk/umbrello/commit/ef7e41fe2c99045a5fe6301c5aed92267a410d9c -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Oliver Kellogg changed: What|Removed |Added CC||okellogg@users.sourceforge. ||net --- Comment #5 from Oliver Kellogg --- (In reply to justin_wu from comment #0) > [...] > STEPS TO REPRODUCE > 1. download live555 source code, > http://www.live555.com/liveMedia/public/live.2022.06.16.tar.gz That version is no longer available but I downloaded live.2022.10.01.tar.gz and with this version and Xuxu's patch applied, that problem did not happen. -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Oliver Kellogg changed: What|Removed |Added Status|REPORTED|RESOLVED Version Fixed In||2.36.80 (KDE releases ||22.11.80) Resolution|--- |FIXED Latest Commit||https://invent.kde.org/sdk/ ||umbrello/commit/035c942f83e ||0d8d39b31c531f237e8ccc08956 ||56 --- Comment #4 from Oliver Kellogg --- Git commit 035c942f83e0d8d39b31c531f237e8ccc0895656 by Oliver Kellogg. Committed on 19/11/2022 at 19:35. Pushed by okellogg into branch 'release/22.12'. lib/cppparser/parser.cpp : Apply patch of comment #1 by Xuxu. Thanks. FIXED-IN: 2.36.80 (KDE releases 22.11.80) M +6-6lib/cppparser/parser.cpp https://invent.kde.org/sdk/umbrello/commit/035c942f83e0d8d39b31c531f237e8ccc0895656 -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 --- Comment #3 from Xuxu --- As you said, source code change std::auto_prt to std::unique_ptr serveral release ago, but forgot to fix `&(*declarator)`. Your advice is very useful. -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Robert Hairgrove changed: What|Removed |Added CC||c...@roberthairgrove.com --- Comment #2 from Robert Hairgrove --- I think the problem is that these classes depend on some KDE stuff which define AST as a macro which formerly was probably std::auto_ptr, but in more recent versions uses std::unique_ptr. If the unique_ptr is wrapping a NULL pointer, then of course the &(*) etc. will crash hbecause this is dereferencing a NULL pointer. However, `operator bool()` is overloaded in `std::unique_ptr`, so one could also write simply: ``` if (declarator) { // etc. ``` instead of: ``` if (&(*declarator)) { ``` or ``` if (declarator.get())) { ``` -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 456427] code import crash
https://bugs.kde.org/show_bug.cgi?id=456427 Xuxu changed: What|Removed |Added CC||zhongjie...@yeah.net --- Comment #1 from Xuxu --- I have a patch to fix this. you should patch `lib/cppparser/parser.cpp` with below. >> I think use `&(*std::unique_ptr)` is superfluous. `std::unique_ptr.get()` >> have the same effect. Hope the maintainer fix this as soon as possible *** umbrello branch release/22.08 *** ``` diff --color -uprN a/lib/cppparser/parser.cpp b/lib/cppparser/parser.cpp --- a/lib/cppparser/parser.cpp 2022-10-11 03:38:32.0 +0800 +++ b/lib/cppparser/parser.cpp 2022-10-25 00:45:11.678067641 +0800 @@ -1844,7 +1844,7 @@ template void Parser::eventuallyTakeComment(int startLn, int endLn, Type& ast) { if (comment().line() >= startLn && comment().line() <= endLn) { -if (&(*ast)) { +if (ast.get()) { if (comment()) { ast->setComment(comment()); } @@ -1860,7 +1860,7 @@ void Parser::eventuallyTakeComment(Type& int line = currentLine(); Comment c = m_commentStore.getCommentsInRange(line, true); -if (&(*ast) && c) { +if (ast.get() && c) { ast->setComment(c); } } @@ -3158,7 +3158,7 @@ bool Parser::parseDeclarationInternal(De int endSignature = m_lexer->index(); Comment mcomment; -if (&(*declarator)) { +if (declarator.get()) { int endLine, endColumn; declarator->getEndPosition(&endLine, &endColumn); mcomment = m_commentStore.getCommentsInRange(endLine); @@ -3294,7 +3294,7 @@ start_decl: } Comment mcomment; -if (&(*decl)) { +if (decl.get()) { int line, col; decl->getEndPosition(&line, &col); mcomment = m_commentStore.getCommentsInRange(line); @@ -3311,7 +3311,7 @@ start_decl: SimpleDeclarationAST::Node ast = CreateNode(); int line, col; ast->setComment(mcomment); -if (&(*decl)) { +if (decl.get()) { decl->getEndPosition(&line, &col); preparseLineComments(line); @@ -3343,7 +3343,7 @@ start_decl: FunctionDefinitionAST::Node ast = CreateNode(); ast->setComment(mcomment); -if (&(*decl)) { +if (decl.get()) { int line, col; decl->getEndPosition(&line, &col); ``` -- You are receiving this mail because: You are watching all bug changes.