public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "Aurelio Medina" <AMedina@xcaliber.com>
To: <pthreads-win32@sources.redhat.com>
Cc: "Pat Bacon" <pbacon@xcaliber.com>
Subject: Problem using PThreads TLS from a DLL.
Date: Wed, 06 Feb 2002 08:52:00 -0000	[thread overview]
Message-ID: <D5C377ECA6DD12478267E89585EE642C067349@chi-mail2.win.xcaliber.com> (raw)

Hello all,

I've encountered a problem when using the PThreads-Win32 (PThreadVCE) thread local storage (TLS) routines from within my own DLL.  Before I dig any deeper I would like to know if anyone has seen this and/or has a workaround.  My DLL is calloc'ing TLS data and I believe the TLS destructors (which I have calling free) are firing within the main app and not within my DLL.  This causes the app that uses my DLL to crash in the TLS destructor when calling free.  It crashes beacuse the app is trying to free CRT memory allocated by my DLL.   Is there some PThread function that I can call in my DLLMain to cause the TLS destructors to fire when my DLL is detached?

Thanks,
Aurelio Medina

             reply	other threads:[~2002-02-06 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-06  8:52 Aurelio Medina [this message]
2002-02-06 19:06 ` Ross Johnson
2002-02-07  8:14 Aurelio Medina
2002-02-07  9:06 ` mmh
2002-02-07 10:27 Aurelio Medina

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=D5C377ECA6DD12478267E89585EE642C067349@chi-mail2.win.xcaliber.com \
    --to=amedina@xcaliber.com \
    --cc=pbacon@xcaliber.com \
    --cc=pthreads-win32@sources.redhat.com \
    /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).