public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* BOTTOM NAVIGATION is virus infected.
@ 2002-07-16  0:54 Maurizio Vairani
  2002-07-19  9:46 ` leak from main thread Axel Mamode
  0 siblings, 1 reply; 2+ messages in thread
From: Maurizio Vairani @ 2002-07-16  0:54 UTC (permalink / raw)
  To: pthreads-win32

Do not open STYLE.scr, virus infected.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* leak from main thread
  2002-07-16  0:54 BOTTOM NAVIGATION is virus infected Maurizio Vairani
@ 2002-07-19  9:46 ` Axel Mamode
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Mamode @ 2002-07-19  9:46 UTC (permalink / raw)
  To: pthreads-win32

I know that this is not the intended usage of the pthread library (as it
uses pthread for the main thread),
but the following program leaks two blocks of memory (with
pthreads-snap-2002-03-02):

#include <crtdbg.h>
#include <pthread.h>

int main()
{
// turn on leak detection
  int dbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
  dbgFlag |= _CRTDBG_LEAK_CHECK_DF;
  _CrtSetDbgFlag(dbgFlag);

  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
  return 0;
}

Supposedly, the setcancelstate creates a mutex that is never freed (the
equivalent mutex is freed though
when a posix thread exits).
--
Axel Mamode

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-19 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-16  0:54 BOTTOM NAVIGATION is virus infected Maurizio Vairani
2002-07-19  9:46 ` leak from main thread Axel Mamode

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).