delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/17/11:23:52

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-Id: <1276788219.11505.1380590885@webmail.messagingengine.com>
From: "Charles Wilson" <cygwin AT cwilson DOT fastmail DOT fm>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
References: <4C198B44 DOT 6040803 AT cwilson DOT fastmail DOT fm> <4C1A11EF DOT 9000405 AT gmail DOT com> <4C1A2829 DOT 3090602 AT gmail DOT com> <4C1A2BBA DOT 6080805 AT cwilson DOT fastmail DOT fm>
Subject: Re: C++ app segfaults in libstdc++
In-Reply-To: <4C1A2BBA.6080805@cwilson.fastmail.fm>
Date: Thu, 17 Jun 2010 11:23:39 -0400
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--_----------=_1276788219115050
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
Date: Thu, 17 Jun 2010 11:23:39 -0400
X-Mailer: MessagingEngine.com Webmail Interface

On Thu, 17 Jun 2010 10:05 -0400, "Charles Wilson" wrote:
> On 6/17/2010 9:50 AM, Dave Korn wrote:
> >   To summarize the summary of the summary: C++ is complicated.
> 
> No kidding.  What if the datatypes used in the interface between the
> module and main -- including ALL exception classes -- were defined in a
> second DLL, on which both module and main depend?  Then module could be
> dynamically loaded (and unloaded), without any 'static' entanglments
> with main.
> 
> But...I'm not sure if that would fix the problem you described in your
> first reply, since module would have created the modexc instance, even
> if the class is defined in another DLL.  I'll give it a try later on.

As expected, this didn't work. But...the imports and exports are NOT
what I expected, so I'm a little confused:

shared-data-types.dll exports:
[Ordinal/Name Pointer] Table
        [   0] modexc::~modexc()
        [   1] modexc::~modexc()
        [   2] modexc::what() const
        [   3] typeinfo for modexc
        [   4] typeinfo name for modexc
        [   5] vtable for modexc
        [   6] shared_data_types_dummy

module.dll imports from shared-data-types:
        DLL Name: shared-data-types.dll
        vma:  Hint/Ord Member-Name Bound-To
        8228        5  vtable for modexc

module.dll exports:
[Ordinal/Name Pointer] Table
        [   0] modbar()
        [   1] modexc::modexc(modexc const&)
        [   2] modexc::modexc(std::basic_string<char,
        std::char_traits<char>, std::allocator<char> >)
        [   3] modexc::~modexc()
        [   4] modexc::what() const
        [   5] std::exception::exception(std::exception const&)
        [   6] std::exception::exception()
        [   7] typeinfo for modexc
        [   8] typeinfo name for modexc
        [   9] modfoo

Err, what? (a) why is this DLL exporting modexc stuff, when it is marked
dllimport in this context? (b) why is this DLL exporting std::exception
stuff?

And then, main imports from shared-data-types.dll (it has no imports
from module.dll, obviously):
        DLL Name: shared-data-types.dll
        vma:  Hint/Ord Member-Name Bound-To
        7228        5  vtable for modexc


If I put a dummy instantiation of modexc in shared-data-types.cpp, then
the exports from that DLL are slightly more extensive, but this has no
effect on the imports of the other dll/exe.

binutils             2.20.51-2
cygwin               1.7.5-1
gcc4-g++             4.3.4-3

I'm wondering if some of the 4.4.x and 4.5.x changes having to do with
how entities are labeled fix these issues; e.g. I'm looking at a
compiler "bug" in addition to the other problems you've mentioned?

--
Chuck




--_----------=_1276788219115050
MIME-Version: 1.0
Content-Disposition: attachment; filename="libtool-segfault-stc2.tar.bz2"
Content-Id: <114SSbY5HJ2g5wLRpN/NltA67K8 AT messagingengine DOT com>
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream; name="libtool-segfault-stc2.tar.bz2"
X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07)
Date: Thu, 17 Jun 2010 11:23:39 -0400

QlpoOTFBWSZTWU2AYBsABiZ/5tywBABc//+ff/fe9P/v3+8QEAAIKAACAAAI
YAY++33Nw05fG93loDQKAElJMaU/VPUAyaaBiDQeUA9QBpoANBo0PUADgaDT
IaaNDCBkNDBGhpk0aAZBiAANBkIEJNAaA0AaAADINAAAAAAGEqag9Q9QAGmg
AAeoAyMgaAAAAARSUYpP9U9J6U/QU9qm1PRAAaAGQAAHpG1AAaBFIQIZGiaa
MU00n6SYmmEDJpoyNANBkGED1Mq6fVBHozXDyP8bERurKTAxNVSdMRtaJYoW
+tBuicFRSHq88arrBiIBuAiAYFIGQwQ4RRBnuwYMtBbPCirFKkRGgtPhuS9t
drGjz0Gr1ML2dqsc9gQwgGGw4EzgNQoagK7SgKQSAwLDGmKClrL9heokEtGm
TwQVQEEBMrJE0rXZXZFdSwolAo4UmHaHr2jNDfY+BnGlL5VpPUul+mEA18dA
5hDkp+7WGp+q4hI53nR0I3quY7LMOIrV2ujr+I1jQyG0dCEYUIxIzDNOZNK2
wRBwlIjw6zb7KVVaiw+46pvObaYHE4S0kyy63ZrwipimfSSvShwJ9Qs0TMld
mj4CWalsyAjYdWuJ3FWJBeTNKTXqkEjIQGEw4BAZB8pJIL8DPdUh8xBED0HD
CwQMQRDuDeRKEhF2476sVECllhEyDrvEege4G/LJOgtWcFhGJBQiWwuq9PNK
slBHeM6zIN3kyV7A7AUrOjYGBNzCHlJEyAJFqWIJY0QQL8YUZymGYr5JtUE0
gnAcIopItQ4hNDboCUMFA6XDUACYJ7KjAJivIp11ZYJlhSqGxZL41+fxLeyX
LSiy8vbW5cMgFq5a6UYcCmgGE7QWFYl0kYJKkKQQmUg8lJmVSULgjIA8NgPJ
gTBUALlopq8m0hAmTp1cIqIqk7qIkzETFGWL3RaKq5zGpTFQVTVWtbX7KVQo
8A6gBx84bwri2CCUFo3iCablG4SJwURakkaazQmhP5kpuk1McLG6xSJFi2js
RQuIhUlQIEu5KYW8wWx4l+pNi+cbw5HM4pM0D5kwG1fQlTtaQwxWuvrqVJIf
eutWYptUHYN9TWtbcpqcLBlrfHBk+JXg4HHuJ7bhxJCzLlkYFOOti4yloakq
L6YvpJLnDcLkF/erWl2UOz76ZDKN5zERK4tSxBENNYtIz1tHIV0qamBEIulS
JZU5UM3BCULxPdJAO5fASDSCYnsOIkZ19ZUYBLQQJnfaJIhwWRqNh3ipDxDW
UOIiMTlRwoFw8i8ZmAhEuBgvENJ5jFGvK1+pKkZvd0yC98OCFROqIrUMpo1G
/jGcvASmsGZKTmXEFRCMjSSsoSrWh5yZAJDB+loe2ErXGhDuQtCBtaAm4blL
X+r5RA4m81nFVTW5eU3hypKDA5Qi11rZQam9qrbNgeODgNq7y9NZCHnxZlwp
qC5C0tUzEBoApxbWNkZ3bta1yE71UDztiNiZhqOViCM6G46xUXYZWRB7QxWS
6jE38hIgghWZNm0jebzp/7ydPT7vT2wy5UxIIgcDQcOoYrUaVrR9fHFtxt8s
G8iogbTlk9qDoSDs+4SLoJ6slKFCcirQ+8X5w1UkhLQSJ55n9jImGmCyokAc
G1oE1KMQEAdrjGZIY7C5hA4ATXUYWoZgzPXXaVPAJFZeUQoO3IQCY83RlErH
qOwOYyIVEjIs2MJDgGQyFM9JwnynMgqA0HqyhtU48r30KIXhxlxM28hEhDvM
hnWYryoTOfF3a5zecInBkrW0yjMMVyLxGvjLk2nOSJGg74dwwMhgF+ojjgZG
wNBYtVYJULBAMFDeF64xuQ2LYByEDQtMprUngIaiwuDBG06FCFg3NSnSuswN
5mdi0Q4HWOdcQA6xqOIL0TIOs38yTWGZBOYkiCYp/4u5IpwoSCbAMA2A


--_----------=_1276788219115050
Content-Type: text/plain; charset=us-ascii

--
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
--_----------=_1276788219115050--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019