public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "Gardian, Milan" <Milan.Gardian@LEIBINGER.com>
To: Mike Kinghan <Mike_Kinghan@systemsunion.com> ,
	 "Pthreads-Win32@Sources.Redhat.Com"
	<pthreads-win32@sources.redhat.com>
Cc: "Ross Johnson (E-mail)" <rpj@ise.canberra.edu.au> ,
	 "John Bossom (E-mail)" <John.Bossom@Cognos.COM>
Subject: RE: pthreads VCE: problem with destructor
Date: Tue, 16 Jan 2001 01:18:00 -0000	[thread overview]
Message-ID: <4052AC502903D411AD1200508B2C0C100314754A@exchange> (raw)

Hi Mike,

> Yeah, I have encountered similar problems. I presume
> you are using MS VC++ 6.0 and that these disappearing
> destructors affect your release build but not your
> debug build?

Just wanted to let you know that the problem occurs in debug build as well.
I tried two things:

1. the pthreads distribution, compiled using the command-line VC++
compiler/linker (that contains the full debug info, no optimisations) ->
added a test 'exit4.c' that fails, as described in my previous mail

2. pthreads library compiled from VC++ GUI environment (pthreads.dsp + a
test project). This was a bit more complex than the 'exit4.c' test but also
failed - in both debug (no optimisations) and release builds

I eventually tracked the problem down to

  extern "C"

versus

  extern

function declaration+definition. If the exception is thrown from a function
that was exported as extern "C" from the DLL, destructor is not called
(stack rollback is not performed). On the other hand if the exception is
thrown from a function exported as extern (C++ name mangling and co.), there
is no problem at all (full stack rollback -> destructor call).

Anyway I liked the contribution from John Bossom and will support the
removal of VCE version of pthreads from the library as suggested by Ross
Johnson. I think the C++ stuff introduces more problems than it fixes...

Cheers,

	Milan

WARNING: multiple messages have this Message-ID
From: "Gardian, Milan" <Milan.Gardian@LEIBINGER.com>
To: Mike Kinghan <Mike_Kinghan@systemsunion.com>,
	"Pthreads-Win32@Sources.Redhat.Com"
	<pthreads-win32@sources.redhat.com>
Cc: "Ross Johnson (E-mail)" <rpj@ise.canberra.edu.au>,
	"John Bossom (E-mail)" <John.Bossom@Cognos.COM>
Subject: RE: pthreads VCE: problem with destructor
Date: Wed, 19 Dec 2001 04:05:00 -0000	[thread overview]
Message-ID: <4052AC502903D411AD1200508B2C0C100314754A@exchange> (raw)
Message-ID: <20011219040500.z8eKQIgW9fTEpdb45yhDFQEga7SV93BTCCs7AqxXLJE@z> (raw)

Hi Mike,

> Yeah, I have encountered similar problems. I presume
> you are using MS VC++ 6.0 and that these disappearing
> destructors affect your release build but not your
> debug build?

Just wanted to let you know that the problem occurs in debug build as well.
I tried two things:

1. the pthreads distribution, compiled using the command-line VC++
compiler/linker (that contains the full debug info, no optimisations) ->
added a test 'exit4.c' that fails, as described in my previous mail

2. pthreads library compiled from VC++ GUI environment (pthreads.dsp + a
test project). This was a bit more complex than the 'exit4.c' test but also
failed - in both debug (no optimisations) and release builds

I eventually tracked the problem down to

  extern "C"

versus

  extern

function declaration+definition. If the exception is thrown from a function
that was exported as extern "C" from the DLL, destructor is not called
(stack rollback is not performed). On the other hand if the exception is
thrown from a function exported as extern (C++ name mangling and co.), there
is no problem at all (full stack rollback -> destructor call).

Anyway I liked the contribution from John Bossom and will support the
removal of VCE version of pthreads from the library as suggested by Ross
Johnson. I think the C++ stuff introduces more problems than it fixes...

Cheers,

	Milan

             reply	other threads:[~2001-12-19 12:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-16  1:18 Gardian, Milan [this message]
2001-12-19  4:05 ` Gardian, Milan
  -- strict thread matches above, loose matches on Subject: below --
2001-03-22 11:41 Bossom, John
2001-12-20  8:46 ` Bossom, John
2001-03-22 11:39 Alexander Terekhov
2001-12-20  6:08 ` Alexander Terekhov
2001-03-22 11:19 Thomas Pfaff
2001-12-20  4:40 ` Thomas Pfaff
2001-03-12  5:53 Alexander Terekhov
2001-12-20  2:35 ` Alexander Terekhov
2001-02-23  8:35 Bossom, John
2001-12-19 13:19 ` Bossom, John
2001-02-01  6:46 Alexander Terekhov
2001-12-19 11:30 ` Alexander Terekhov
2001-01-24 21:42 Alexander Terekhov
2001-12-19 11:01 ` Alexander Terekhov
2001-01-16 16:48 Bossom, John
2001-12-19  6:02 ` Bossom, John
2001-01-16  7:38 Alexander Terekhov
2001-12-19  4:40 ` Alexander Terekhov
2001-01-11  7:04 Bossom, John
2001-01-15  7:40 ` Ross Johnson
2001-01-24 14:02   ` reentrant
2001-03-10  6:41     ` Thomas Pfaff
2001-12-20  1:25       ` Thomas Pfaff
2001-12-19 10:22     ` reentrant
2001-12-19  3:38   ` Ross Johnson
2001-12-18 12:22 ` Bossom, John
2001-01-11  6:04 Mike Kinghan
2001-12-18  7:00 ` Mike Kinghan
2001-01-05  8:30 Gardian, Milan
2001-12-18  6:18 ` Gardian, Milan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4052AC502903D411AD1200508B2C0C100314754A@exchange \
    --to=milan.gardian@leibinger.com \
    --cc=John.Bossom@Cognos.COM \
    --cc=Mike_Kinghan@systemsunion.com \
    --cc=pthreads-win32@sources.redhat.com \
    --cc=rpj@ise.canberra.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).