Bwm*_*mat 5 c++ gcc solaris exception-handling sparc
这种情况发生在Solaris sparc机器上:
-bash-3.2$ uname -a
SunOS b2s-sol10spr-1 5.10 Generic_147147-26 sun4v sparc sun4v
Run Code Online (Sandbox Code Playgroud)
我发现异常处理有一个奇怪的问题.这是一个简短的调试会话日志:
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Touchstone_solaris64_iodbc...done.
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) catch catch
Catchpoint 2 (catch)
(gdb) r
Starting program: /bamboo/mattheww/Touchstone_solaris64_iodbc -te Tests/Touchstone/SQL/SqlTestEnv_utf32.xml -ts Tests/Touchstone/SQL/SqlTestSuite.xml -o failure -rtn EXPECTEDFAILURES_QUERIESONLY-15
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Simba Test Verbose Log Started on Fri Aug 17 12:51:50 2018
Starting test run
---------------------------
Touchstone test utility for ODBC and OLE DB for OLAP
Version: 4.5.0.5 (64-bit)
Copyright (c) 2018 Simba Technologies Incorporated
__BUILD_INFO__ built at __BUILD_TIME__
getpid=22056
[Switching to Thread 1 (LWP 1)]
Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=
0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
65 /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc: No such file or directory.
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0xffffffff7a6f4188 in Simba::SQLEngine::AEScalarFnMetadataFactory::ValidateCotArgs (in_argument=0) at AEBuilder/Value/AEScalarFnMetadataFactory.cpp:2186
#2 0xffffffff7ab72d28 in Simba::SQLEngine::ETCotFn::RetrieveData (this=0x101db8ff0, io_dataRequest=...) at ETree/Value/ScalarFunctions/ETCotFn.cpp:37
#3 0xffffffff7a98c96c in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::GetLeftData (this=0x101db90f0) at Include/ETree/ETComparisonT.h:80
#4 0xffffffff7a976ac4 in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::Evaluate (this=0x101db90f0) at Include/ETree/ETComparisonT.h:104
#5 0xffffffff7a9c2510 in Simba::SQLEngine::ETSelect::DoMove (this=0x101ec53f0, in_moveRequest=...) at ETree/Relational/ETSelect.cpp:143
#6 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec53f0, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#7 0xffffffff7a9b8c90 in Simba::SQLEngine::ETProject::DoMove (this=0x101ec5450, in_moveRequest=...) at ETree/Relational/ETProject.cpp:143
#8 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#9 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
#10 0xffffffff7ad4f590 in Simba::ODBC::ForwardOnlyCursor::FetchRowset (this=0x101ec5650, in_orientation=1, in_offset=0, in_rowsetSize=1, in_ard=0x1014de6f0, in_rowStatusPtr=0x0, in_rowsProcessedPtr=0x0)
at Cursor/ForwardOnlyCursor.cpp:329
#11 0xffffffff7adc0c88 in Simba::ODBC::QueryManager::FetchRowset (this=0x101eb4810, in_orientation=1, in_offset=0, in_rowsetSize=1, in_rowStatusPtr=0x0, in_rowsProcessedPtr=0x0) at QueryManager/QueryManager.cpp:87
#12 0xffffffff7adf93a0 in Simba::ODBC::StatementStateCursor::DoFetchScroll (this=0x101b12280, in_fetchOrientation=1, in_fetchOffset=0) at Statement/StatementStateCursor.cpp:823
#13 0xffffffff7ae06f18 in Simba::ODBC::StatementState5::SQLFetch (this=0x101b12280) at Statement/StatementState5.cpp:74
#14 0xffffffff7add6f20 in Simba::ODBC::Statement::SQLFetch (this=0x101e63c30) at Statement/Statement.cpp:986
#15 0xffffffff7acb1610 in Simba::ODBC::SQLFetchTask::DoSynchronously (in_stmt=..., in_params=...) at CInterface/SQLFetchTask.h:73
#16 0xffffffff7acc5884 in DoTask<Simba::ODBC::SQLFetchTask> (in_functionName=0xffffffff7af8fcb0 "SQLFetch", in_handle=0x3, in_parameters=...) at CInterface/CInterface.cpp:679
#17 0xffffffff7ac9ab3c in SQLFetch (StatementHandle=0x3) at CInterface/CInterface.cpp:1693
#18 0xffffffff7d32a1f4 in SQLFetch_Internal (hstmt=0x101b04fb0) at fetch.c:161
#19 0xffffffff7d32a560 in SQLFetch (hstmt=0x101b04fb0) at fetch.c:230
#20 0x00000001001f7454 in Simba::ODBCTest::Cli::SqlFetch (this=0x10143a3b0 <Simba::ODBCTest::Singleton<Simba::ODBCTest::Cli>::m_instance>, handle=0x101b04fb0) at SimbaODBCTestFramework/Cli/Cli.cpp:1109
#21 0x00000001002c9c98 in Simba::ODBCTest::Statement::SqlFetch (this=0x101e640a0, outcome=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=828) at SimbaODBCTestFramework/ODBC/Statement.cpp:200
#22 0x0000000100c9ae98 in Simba::ODBCTest::ODBCXmlResultTestsBase::Pimpl::ValidateRows (this=0x1014e0640, test=..., xmlResult=0x1014df050) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:828
#23 0x0000000100c96a94 in Simba::ODBCTest::ODBCXmlResultTestsBase::DoResultValidation (this=0x1018fc800, test=..., xmlFileName=..., expectedFileName=..., queryFileName=...) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:504
#24 0x0000000100ca5ca4 in Simba::ODBCTest::ODBCXmlSimpleResultTestsBase::executeTest (this=0x1018fc800) at TestCases/SQLTests/ODBCXmlSimpleResultTestsBase.cpp:215
#25 0x0000000100ca8478 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:180
#26 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#27 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#28 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#29 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) cont
Continuing.
Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x101ff73b0, tinfo=0x1013b9960 <typeinfo for Simba::Test::ValueMismatchException>, dest=0x100ce4e34 <Simba::Test::ValueMismatchException::~ValueMismatchException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
65 in /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ff73b0, tinfo=0x1013b9960 <typeinfo for Simba::Test::ValueMismatchException>, dest=0x100ce4e34 <Simba::Test::ValueMismatchException::~ValueMismatchException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0x0000000100ce4f28 in Simba::Test::ValueMismatchException::raise (this=0xffffffff7fffdd38) at TestFrameworkLibrary/Exceptions/SBTValueMismatchException.cpp:28
#2 0x000000010029e524 in Simba::ODBCTest::RaiseMismatchException (msg=...) at SimbaODBCTestFramework/Framework/VerifyValues.h:29
#3 0x000000010033c3d4 in Simba::ODBCTest::VerifyAndThrowComparator<Simba::ODBCTest::Comparator<short> > (comparator=..., msg=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=888)
at SimbaODBCTestFramework/Framework/VerifyValues.h:227
#4 0x000000010033c1b0 in Simba::ODBCTest::VerifyAndThrow<short> (expected=@0xffffffff7fffe34e: 1, actual=@0xffffffff7fffe396: 100, msg=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=888)
at SimbaODBCTestFramework/Framework/VerifyValues.h:251
#5 0x0000000100c9b450 in Simba::ODBCTest::ODBCXmlResultTestsBase::Pimpl::ValidateRows (this=0x1014e0640, test=..., xmlResult=0x1014df050) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:888
#6 0x0000000100c96a94 in Simba::ODBCTest::ODBCXmlResultTestsBase::DoResultValidation (this=0x1018fc800, test=..., xmlFileName=..., expectedFileName=..., queryFileName=...) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:504
#7 0x0000000100ca5ca4 in Simba::ODBCTest::ODBCXmlSimpleResultTestsBase::executeTest (this=0x1018fc800) at TestCases/SQLTests/ODBCXmlSimpleResultTestsBase.cpp:215
#8 0x0000000100ca8478 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:180
#9 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#10 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#11 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#12 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) cont
Continuing.
Catchpoint 2 (exception caught), __cxxabiv1::__cxa_begin_catch (exc_obj_in=0x101ff7390) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc:41
41 /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc: No such file or directory.
(gdb) where
#0 __cxxabiv1::__cxa_begin_catch (exc_obj_in=0x101ff7390) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc:41
#1 0x0000000100ca8774 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:183
#2 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#3 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#4 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#5 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) info share
From To Syms Read Shared Object Library
0xffffffff7f606ca0 0xffffffff7f634270 Yes (*) /usr/lib/sparcv9/ld.so.1
Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
0xffffffff7d8e00e8 0xffffffff7da07e0c Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
0xffffffff7d56a798 0xffffffff7d62c31c Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
Yes (*) /lib/64/libpthread.so.1
0xffffffff7d30f8b0 0xffffffff7d377994 Yes /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2
0xffffffff7d104fe0 0xffffffff7d10cc20 Yes (*) /lib/64/libsocket.so.1
0xffffffff7cf22340 0xffffffff7cf9e350 Yes (*) /lib/64/libnsl.so.1
0xffffffff7cca9d38 0xffffffff7cd4a6a8 Yes /opt/csw/lib/64/libstdc++.so.6
0xffffffff7ca0b080 0xffffffff7ca7b7a8 Yes (*) /lib/64/libm.so.2
0xffffffff7c802d68 0xffffffff7c806000 Yes (*) /lib/64/librt.so.1
0xffffffff7c602ef8 0xffffffff7c610028 Yes /opt/csw/lib/64/libgcc_s.so.1
0xffffffff7c32ed60 0xffffffff7c3dd4b0 Yes (*) /lib/64/libc.so.1
Yes (*) /lib/64/libdl.so.1
0xffffffff7bf02328 0xffffffff7bf09b38 Yes /usr/sfw/lib/64/libgcc_s.so.1
0xffffffff7bd01e60 0xffffffff7bd076ac Yes (*) /lib/64/libaio.so.1
0xffffffff7bb008a0 0xffffffff7bb0c880 Yes (*) /lib/64/libmd.so.1
0xffffffff7c000460 0xffffffff7c00137c Yes (*) /platform/sun4v/lib/sparcv9/libc_psr.so.1
0xffffffff79dece38 0xffffffff7ae0d3ec Yes /bamboo/mattheww/DRIVER
0xffffffff796009b8 0xffffffff7960c840 Yes (*) /platform/sun4v/lib/sparcv9/libmd_psr.so.1
0xffffffff79400bb0 0xffffffff79402bb0 Yes (*) /lib/64/libmp.so.2
0xffffffff79207690 0xffffffff79217630 Yes (*) /lib/64/libscf.so.1
0xffffffff79001358 0xffffffff79002008 Yes (*) /lib/64/libdoor.so.1
0xffffffff78e02518 0xffffffff78e06c58 Yes (*) /lib/64/libuutil.so.1
0xffffffff78c01f08 0xffffffff78c06104 Yes (*) /lib/64/libgen.so.1
0xffffffff78a03030 0xffffffff78a21078 Yes /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbcinst.so
(*): Shared library is missing debugging information.
(gdb) quit
Run Code Online (Sandbox Code Playgroud)
在抛出第一个异常之后,第14帧有一个用于SESqlErrorException基类的catch块,所以应该在那里捕获它(并且没有应该插入的catch块).然而,gdb catch catch未能破解.
此外,线程/进程未被杀死; 相反,似乎执行以某种方式继续(不会引起任何其他问题),直到我们返回主二进制(初始抛出后的第20帧).我仍然不确定投掷后执行继续的确切位置,需要稍后查看.
但是,似乎异常处理在主二进制文件中工作,因为当主二进制文件抛出并捕获异常时我们会中断.
我在上面的日志中没有它,但是我注意到它在抛出异常时中断的指令的地址(即__cxxabiv1 :: __ cxa_begin_catch)实际上略微超出了内存范围info share显示libstdc ++.so.6.我该如何解释?我在看这个,因为早些时候我注意到我们错误地构建了libicui18n_sb64.so.53以与C++运行时静态链接,并且当这个问题发生时,执行throw的指令是(据我所知) ,在libicui18n_sb64.so.53中,它在信息共享范围之外,但不在任何其他库的范围内).我认为这是问题的根源(使用运行时的一个副本中的代码抛出异常,因此它不会被另一个副本捕获),但修复该库并没有使问题消失.
我注意到的其他事情是它声称__cxxabiv1 :: __ cxa_throw来自/home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/ libsupc ++/eh_throw.cc:65,这让我有点怀疑,因为我们用gcc 4.9编译了所有内容,但不确定这是否是一个问题.
以下是有关callstack中所有库/二进制文件的依赖关系的一些信息:
Dependencies for /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53:
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libaio.so.1 => /lib/64/libaio.so.1
libmd.so.1 => /lib/64/libmd.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53:
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libaio.so.1 => /lib/64/libaio.so.1
libmd.so.1 => /lib/64/libmd.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2:
libdl.so.1 => /lib/64/libdl.so.1
libc.so.1 => /lib/64/libc.so.1
libgcc_s.so.1 => /usr/sfw/lib/64/libgcc_s.so.1
libm.so.2 => /lib/64/libm.so.2
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
Dependencies for /bamboo/mattheww/DRIVER:
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libicui18n_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libscf.so.1 => /lib/64/libscf.so.1
libaio.so.1 => /lib/64/libaio.so.1
libdoor.so.1 => /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 => /lib/64/libgen.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for ./Touchstone_solaris64_iodbc:
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libicui18n_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libiodbc.so.2 => /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libdl.so.1 => /lib/64/libdl.so.1
libgcc_s.so.1 => /usr/sfw/lib/64/libgcc_s.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libscf.so.1 => /lib/64/libscf.so.1
libaio.so.1 => /lib/64/libaio.so.1
libdoor.so.1 => /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 => /lib/64/libgen.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Run Code Online (Sandbox Code Playgroud)
它们都依赖于/opt/csw/lib/64/libstdc++.so.6&/opt/csw/lib/64/libgcc_s.so.1,我不确定是否有任何其他库与异常处理相关?(我在混合使用gcc和'本地'运行时时已经阅读过/看到过的问题,但我认为这不会发生在这里?)
这是库(/ bamboo/mattheww/DRIVER)的构建方式:
用于编译其中一个.cpp文件的示例命令(我删除了一堆包含目录)
/opt/csw/gcc4/bin/g++ -DSIZEOF_LONG_INT=8 -DSQL_WCHART_CONVERT -DHAVE_MEMMOVE -m64 -fPIC -pthread -Wall -Wno-unknown-pragmas -DSIMBA -D_REENTRANT -DCLUNIX -DNDEBUG -D_POSIX_PTHREAD_SEMANTICS -O0 -g -D_DEBUG -c Common/QSTableMetadataFile.cpp -o Common/QSTableMetadataFile_solaris10sparc_gcc4_9_debug64.cpp.o
Run Code Online (Sandbox Code Playgroud)
用于链接的命令(删除了一堆.o文件)
/opt/csw/gcc4/bin/g++ -DSIMBA -D_REENTRANT -m64 -fPIC -pthread -Wall -Wno-unknown-pragmas -lrt -O0 -g -shared -L/bamboo/bamboo-agent-home/xml-data/build-dir/ThirdParty/icu/53.1.x/solaris10sparc/gcc4_9/release64/lib -lstdc++ -licudata_sb64 -licui18n_sb64 -licuuc_sb64 -lpthread -lm -lsocket -lnsl -Wl,-M,exports_SunOS.map -Wl,-zallextract,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaDSI.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaSupport.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libAEProcessor.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libCore.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libDSIExt.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libExecutor.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libParser.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaODBC.a -Wl,-zweakextract -o ../Bin/solaris10sparc/gcc4_9/debug64/libQuickstart64.so
Run Code Online (Sandbox Code Playgroud)
另一件需要提及的是,这种情况发生在64位,而不是32位.最初,32位版本的libicui18n_sb64.so.53已经动态链接到运行时,而libicui18n_sb64.so.53没有,所以我认为差异是原因,但它没有改变观察到的行为.
编辑:
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0xffffffff7a6f4188 in Simba::SQLEngine::AEScalarFnMetadataFactory::ValidateCotArgs (in_argument=0) at AEBuilder/Value/AEScalarFnMetadataFactory.cpp:2186
#2 0xffffffff7ab72d28 in Simba::SQLEngine::ETCotFn::RetrieveData (this=0x101db8ff0, io_dataRequest=...) at ETree/Value/ScalarFunctions/ETCotFn.cpp:37
#3 0xffffffff7a98c96c in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::GetLeftData (this=0x101db90f0) at Include/ETree/ETComparisonT.h:80
#4 0xffffffff7a976ac4 in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::Evaluate (this=0x101db90f0) at Include/ETree/ETComparisonT.h:104
#5 0xffffffff7a9c2510 in Simba::SQLEngine::ETSelect::DoMove (this=0x101ec53f0, in_moveRequest=...) at ETree/Relational/ETSelect.cpp:143
#6 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec53f0, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#7 0xffffffff7a9b8c90 in Simba::SQLEngine::ETProject::DoMove (this=0x101ec5450, in_moveRequest=...) at ETree/Relational/ETProject.cpp:143
#8 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#9 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
<Snipped as this post is now too long>
(gdb) fin
Run till exit from #0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
0xffffffff7a8b4e38 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:357
357 ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h: No such file or directory.
(gdb) where
#0 0xffffffff7a8b4e38 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:357
#1 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
<Snipped as this post is now too long>
(gdb)
Run Code Online (Sandbox Code Playgroud)
我不确定fin当异常处理机制即将展开堆栈时在GDB中做什么意味着什么,但是它回到了非特殊的代码流中,没有被捕获的异常......
编辑:我上传了一个包含两个二进制文件的zip文件,一个有效,一个无效(当我自己重建时,它可以工作,当我们的自动构建系统没有时,它没有):https:// simba. app.box.com/s/qzo8735h9nzyv6t4x2lhzze896v361t1
您可以使用类似的连接字符串来重现iodbctest的问题
DRIVER=<path to driver>;DBF=<path to DBF directory>
Run Code Online (Sandbox Code Playgroud)
并执行查询
select dbl_zero from trig where COT(dbl_zero) = dbl_zero
Run Code Online (Sandbox Code Playgroud)
另外,我在两个二进制文件中反汇编了抛出异常的函数和应该捕获该异常的函数,并且它们是相同的(除了我假设对应于不同地址的一些常量).
编辑:我已经创建了测试运行时的日志,包括工作和损坏的二进制文件,使用LD_DEBUG=bindings:https://simba.box.com/s/w5y246hb4ydm97krjeyjykc90zvjqfo3
我注意到了一些差异,但不确定如何解释他们