gcc-6.3.0-1 regression: libstdc++6 DLL breaks exception handling

Christian Franke Christian.Franke@t-online.de
Tue Feb 7 15:27:00 GMT 2017


JonY wrote:
> On 01/26/2017 10:30 AM, Christian Franke wrote:
>> After upgrading to gcc test version 6.3.0-1, C++ exception handling is
>> broken if DLL version of new libstdc++6 is used.
>>> Noted, I'll consider the test version broken for now.
>>
Meantime I examined the testcase with gdb: The DLL exports a bogus 
address for the symbol "_ZTIi" ('typeinfo for int'). This results in 
this more simple testcase:
#include <typeinfo>
int main() {
 const std::type_info & ti = typeid(int); // &_ZTIi from DLL
 const char * p = ti.name(); // segfaults because &_ZTIi is bogus.
}
And indeed, the export table of the DLL looks 'interesting'. The offsets 
of various exported symbols are apparently all 93980000:
$ objdump -p cygstdc++-6.dll
 [5142] +base[5143] c6760 Export RVA
 [5143] +base[5144] c6768 Export RVA
 [5144] +base[5145] 93980000 Export RVA
...
 [5151] +base[5152] 93980000 Export RVA
 [5152] +base[5153] 93980000 Export RVA
 [5153] +base[5154] 93980000 Export RVA
 [5154] +base[5155] 93980000 Export RVA
...
 [5167] +base[5168] 93980000 Export RVA
 [5168] +base[5169] c6780 Export RVA
...
[Ordinal/Name Pointer] Table
...
 [5143] _ZTISt9type_info
 [5144] _ZTIa
...
 [5151] _ZTIh
 [5152] _ZTIi
 [5153] _ZTIj
 [5154] _ZTIl
...
 [5167] _ZTSDs
 [5168] _ZTSN10__cxxabiv115__forced_unwindE
$ objdump -p cygstdc++-6.dll | grep -cw 93980000
759
Hmm... bug in the (bin)utils used to build the DLL?
Possibly related:
https://cygwin.com/ml/cygwin/2017-01/msg00375.html
Christian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /