connectivity/source/parse/sqlbison.y | 1 + connectivity/source/parse/sqlnode.cxx | 1 + 2 files changed, 2 insertions(+)
New commits: commit 284289a3a8e33b8998ac08ff17f814b028c55375 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Aug 7 13:43:54 2019 +0200 Commit: Xisco FaulĂ <xiscofa...@libreoffice.org> CommitDate: Wed Aug 7 22:04:53 2019 +0200 tdf#126588 crash in saving view regression from commit d425658bd9fd8e315e4931afb544bc845da0360e Date: Wed Dec 19 16:10:51 2018 +0200 pass OSQLParseNode around by unique_ptr We have a OSQLNode being deleted at connectivity::OSQLParseNodesContainer::clearAndDelete() at connectivity/source/parse/sqlnode.cxx:2781 connectivity::OSQLParser::parseTree(rtl::OUString&, rtl::OUString const&, bool) (this=0x38eba90, rErrorMessage="syntax error, unexpected UNION, expecting $end", rStatement="CREATE VIEW \"View1\" AS SELECT \"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS \"Geburtsdatum1\", 1 AS \"MonatZahl1\", COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar' AS \"Monat1\", \"Tab2"..., bInternational=false) at workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:10914 namespace)::parseStatement_throwError(connectivity::OSQLParser&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) (_rParser=..., _rStatement="CREATE VIEW \"View1\" AS SELECT \"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS \"Geburtsdatum1\", 1 AS \"MonatZahl1\", COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar' AS \"Monat1\", \"Tab2"..., _rxContext=uno::Reference to (dbaccess::OSingleSelectQueryComposer *) 0x38eb8d0) at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:106 and then again at std::unique_ptr<connectivity::OSQLParseNode, std::default_delete<connectivity::OSQLParseNode> >::operator=(decltype(nullptr)) (this=0x38eba90) at connectivity/source/parse/sqlnode.cxx:1500 Change-Id: I292627a06369208e0010743063c7eb5a38921a19 Reviewed-on: https://gerrit.libreoffice.org/77106 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 6d024a69164716f7856ec936a72d01a6630d2a7c) Reviewed-on: https://gerrit.libreoffice.org/77133 Reviewed-by: Xisco FaulĂ <xiscofa...@libreoffice.org> diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 013073b882d5..a6aa13353584 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4597,6 +4597,7 @@ std::unique_ptr<OSQLParseNode> OSQLParser::parseTree(OUString& rErrorMessage, // clear the garbage collector (*s_pGarbageCollector)->clearAndDelete(); + m_pParseTree.release(); // because the garbage collector deleted it return nullptr; } else diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 82b8c75b60e7..a51234d4a6d2 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1293,6 +1293,7 @@ std::unique_ptr<OSQLParseNode> OSQLParser::predicateTree(OUString& rErrorMessage // clear the garbage collector (*s_pGarbageCollector)->clearAndDelete(); + m_pParseTree.release(); // because the garbage collector deleted it return nullptr; } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits