diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-02-07 22:48:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-02-07 23:02:57 +0100 |
commit | 653e181fb831a04c2845d99f79f72454a88bb948 (patch) | |
tree | 3ec424e8c21f15573226f7f40eb9bd7e97f49107 /sd/source | |
parent | 32cae6a2eaa41568888df9c8fc5605debd8d704a (diff) |
Revert "remove ugly operator* in DynamicErrorInfo"
This reverts commit b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc.
The problem is this:
==24217== Conditional jump or move depends on uninitialised value(s)
==24217== at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220)
==24217== by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (objstor.cxx:2300)
==24217== by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765)
==24217== by 0x29A6BC48:
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (sfxbasemodel.cxx:1802)
The commit is bogus because it introduces a
DynamicErrorInfo::GetErrorCode(), which overloads
ErrorInfo::GetErrorCode(), which is used at least in
DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor
argument of DynamicErrorInfo but now returns pImpl->lErrId,
which is what this statement is trying to initialize.
Ultimately this causes my clang+ASAN build to fail because the
uninitialized error code happens to be detected as a mere Warning:
Test name: testMathMalformedXml::Import
assertion failed
- Expression: !xComponent.is()
- loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx
Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index d79ff01c3048..f91acb54cf80 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -245,17 +245,17 @@ sal_Int32 ReadThroughComponent( if (!rStreamName.isEmpty()) { - return (new TwoStringErrorInfo( + return *new TwoStringErrorInfo( (bMustBeSuccessfull ? ERR_FORMAT_FILE_ROWCOL : WARN_FORMAT_FILE_ROWCOL), rStreamName, sErr, - ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ))->GetErrorCode(); + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); } else { DBG_ASSERT( bMustBeSuccessfull, "Warnings are not supported" ); - return (new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, - ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ))->GetErrorCode(); + return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); } } catch (const xml::sax::SAXException& r) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index e9155f7e5d80..f91f0663ff81 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -452,7 +452,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } else { - ErrorHandler::HandleError( (new StringErrorInfo(ERRCODE_SFX_OLEGENERAL, ""))->GetErrorCode() ); + ErrorHandler::HandleError(* new StringErrorInfo(ERRCODE_SFX_OLEGENERAL, + "" ) ); } } else diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index b0f37020460a..82b529e869d3 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -864,7 +864,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if (aErrCode != 0 && !bAbort) { - ErrorHandler::HandleError( (new StringErrorInfo(aErrCode, ""))->GetErrorCode() ); + ErrorHandler::HandleError(* new StringErrorInfo(aErrCode, OUString() ) ); } return aErrCode == 0; |