[Libreoffice-commits] core.git: external/firebird
Stephan Bergmann
sbergman at redhat.com
Sun Apr 8 17:11:12 UTC 2018
external/firebird/ubsan.patch | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit a2f395afa2c3bef08129c41f9b0ce92127f986ee
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Sun Apr 8 11:10:55 2018 +0200
external/firebird: Avoid -fsanitize=nonnull-attribute
...during JunitTest_dbaccess_complex:
> workdir/UnpackedTarball/firebird/src/jrd/../dsql/../jrd/extds/../../common/classes/fb_string.h:677:26: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:43:28: note: nonnull attribute specified here
> #0 in Firebird::StringBase<Firebird::StringComparator>::assign(void const*, unsigned int) at workdir/UnpackedTarball/firebird/src/jrd/../dsql/../jrd/extds/../../common/classes/fb_string.h:677:4 (instdir/program/../program/libEngine12.so +0x10d8acb)
> #1 in Jrd::ExecStatementNode::getString(Jrd::thread_db*, Jrd::jrd_req*, Jrd::ValueExprNode const*, Firebird::StringBase<Firebird::StringComparator>&, bool) const at workdir/UnpackedTarball/firebird/src/dsql/StmtNodes.cpp:3506:6 (instdir/program/../program/libEngine12.so +0x1a4cb95)
> #2 in Jrd::ExecStatementNode::execute(Jrd::thread_db*, Jrd::jrd_req*, Jrd::StmtNode::ExeState*) const at workdir/UnpackedTarball/firebird/src/dsql/StmtNodes.cpp:3426:3 (instdir/program/../program/libEngine12.so +0x1a4b21f)
> #3 in EXE_looper(Jrd::thread_db*, Jrd::jrd_req*, Jrd::StmtNode const*) at workdir/UnpackedTarball/firebird/src/jrd/exe.cpp:1292:17 (instdir/program/../program/libEngine12.so +0x129fe0f)
> #4 in looper_seh(Jrd::thread_db*, Jrd::jrd_req*, Jrd::StmtNode const*) at workdir/UnpackedTarball/firebird/src/jrd/exe.cpp:1426:2 (instdir/program/../program/libEngine12.so +0x12a295c)
> #5 in execute_looper(Jrd::thread_db*, Jrd::jrd_req*, Jrd::jrd_tra*, Jrd::StmtNode const*, Jrd::jrd_req::req_s) at workdir/UnpackedTarball/firebird/src/jrd/exe.cpp:1023:2 (instdir/program/../program/libEngine12.so +0x1298007)
> #6 in EXE_receive(Jrd::thread_db*, Jrd::jrd_req*, unsigned short, unsigned int, unsigned char*, bool) at workdir/UnpackedTarball/firebird/src/jrd/exe.cpp:631:3 (instdir/program/../program/libEngine12.so +0x1295ffa)
> #7 in JRD_receive(Jrd::thread_db*, Jrd::jrd_req*, unsigned short, unsigned int, unsigned char*) at workdir/UnpackedTarball/firebird/src/jrd/jrd.cpp:7597:2 (instdir/program/../program/libEngine12.so +0x173b736)
> #8 in Jrd::DsqlDmlRequest::execute(Jrd::thread_db*, Jrd::jrd_tra**, Firebird::IMessageMetadata*, unsigned char const*, Firebird::IMessageMetadata*, unsigned char*, bool) at workdir/UnpackedTarball/firebird/src/dsql/dsql.cpp:723:3 (instdir/program/../program/libEngine12.so +0x1b61a71)
> #9 in DSQL_execute(Jrd::thread_db*, Jrd::jrd_tra**, Jrd::dsql_req*, Firebird::IMessageMetadata*, unsigned char const*, Firebird::IMessageMetadata*, unsigned char*) at workdir/UnpackedTarball/firebird/src/dsql/dsql.cpp:179:11 (instdir/program/../program/libEngine12.so +0x1b53abd)
> #10 in Jrd::JStatement::execute(Firebird::CheckStatusWrapper*, Firebird::ITransaction*, Firebird::IMessageMetadata*, void*, Firebird::IMessageMetadata*, void*) at workdir/UnpackedTarball/firebird/src/jrd/jrd.cpp:4446:4 (instdir/program/../program/libEngine12.so +0x1743f17)
> #11 in Firebird::IStatementBaseImpl<Jrd::JStatement, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Jrd::JStatement, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JStatement, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IStatement> > > > >::cloopexecuteDispatcher(Firebird::IStatement*, Firebird::IStatus*, Firebird::ITransaction*, Firebird::IMessageMetadata*, void*, Firebird::IMessageMetadata*, void*) at workdir/UnpackedTarball/firebird/src/include/firebird/IdlFbInterfaces.h:8120:44 (instdir/program/../program/libEngine12.so +0x177cb46)
> #12 in Firebird::ITransaction* Firebird::IStatement::execute<Firebird::CheckStatusWrapper>(Firebird::CheckStatusWrapper*, Firebird::ITransaction*, Firebird::IMessageMetadata*, void*, Firebird::IMessageMetadata*, void*) at workdir/UnpackedTarball/firebird/src/include/firebird/IdlFbInterfaces.h:1636:24 (instdir/program/../program/libfbclient.so.2 +0x386562)
> #13 in Why::YStatement::execute(Firebird::CheckStatusWrapper*, Firebird::ITransaction*, Firebird::IMessageMetadata*, void*, Firebird::IMessageMetadata*, void*) at workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:4345:42 (instdir/program/../program/libfbclient.so.2 +0x34ecfa)
> #14 in (anonymous namespace)::IscStatement::execute(Firebird::CheckStatusWrapper*, unsigned int*, Firebird::IMessageMetadata*, unsigned char*, Firebird::IMessageMetadata*, unsigned char*) at workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:1372:39 (instdir/program/../program/libfbclient.so.2 +0x337d51)
> #15 in isc_dsql_execute2 at workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:2279:15 (instdir/program/../program/libfbclient.so.2 +0x337096)
> #16 in isc_dsql_execute at workdir/UnpackedTarball/firebird/src/yvalve/why.cpp:2235:9 (instdir/program/../program/libfbclient.so.2 +0x336707)
> #17 in connectivity::firebird::OStatement::executeQuery(rtl::OUString const&) at connectivity/source/drivers/firebird/Statement.cxx:115:12 (instdir/program/../program/libfirebird_sdbclo.so +0x23e8cc)
> #18 in connectivity::firebird::OStatement::execute(rtl::OUString const&) at connectivity/source/drivers/firebird/Statement.cxx:148:45 (instdir/program/../program/libfirebird_sdbclo.so +0x23ff90)
> #19 in OStatement::execute(rtl::OUString const&) at dbaccess/source/core/api/statement.cxx:489:35 (instdir/program/../program/libdbalo.so +0xf5811f)
> #20 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 (instdir/program/libgcc3_uno.so +0xba96d)
> #21 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 (instdir/program/libgcc3_uno.so +0xb6855)
> #22 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:420:13 (instdir/program/libgcc3_uno.so +0xb4663)
> #23 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const at binaryurp/source/incomingrequest.cxx:236:13 (instdir/program/libbinaryurplo.so +0x209ede)
> #24 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 (instdir/program/libbinaryurplo.so +0x205f10)
> #25 in request at binaryurp/source/reader.cxx:85:9 (instdir/program/libbinaryurplo.so +0x2966d3)
> #26 in cppu_threadpool::JobQueue::enter(long, bool) at cppu/source/threadpool/jobqueue.cxx:107:17 (instdir/program/libuno_cppu.so.3 +0x17e863)
> #27 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 (instdir/program/libuno_cppu.so.3 +0x1977bb)
> #28 in threadFunc at include/osl/thread.hxx:185:15 (instdir/program/libuno_cppu.so.3 +0x1a0347)
Change-Id: I2378378caca42270edfbb432096ce6ceca042a3f
Reviewed-on: https://gerrit.libreoffice.org/52582
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/external/firebird/ubsan.patch b/external/firebird/ubsan.patch
index 8ccc1703ec9b..2b659681be24 100644
--- a/external/firebird/ubsan.patch
+++ b/external/firebird/ubsan.patch
@@ -74,6 +74,18 @@
memcpy(newdata, data, sizeof(T) * count);
freeData();
data = newdata;
+--- src/common/classes/fb_string.h
++++ src/common/classes/fb_string.h
+@@ -674,7 +674,8 @@
+ }
+ StringType& assign(const void* s, size_type n)
+ {
+- memcpy(baseAssign(n), s, n);
++ auto const p = baseAssign(n);
++ if (n != 0) memcpy(p, s, n);
+ return *this;
+ }
+ StringType& assign(const_pointer s)
--- src/dsql/StmtNodes.cpp
+++ src/dsql/StmtNodes.cpp
@@ -6643,7 +6643,7 @@
More information about the Libreoffice-commits
mailing list