public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* C++/dlerror/pthread problem
@ 2003-07-31 14:28 Thorsten Kukuk
  2003-07-31 16:28 ` David Mosberger
  2003-07-31 17:16 ` [PATCH] Fix dlerror (was Re: C++/dlerror/pthread problem) Jakub Jelinek
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Kukuk @ 2003-07-31 14:28 UTC (permalink / raw)
  To: libc-hacker

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]


Hi,

The appended example program works fine, if not linked against
libpthread or if it is compiled as C program. But as C++ program
linked against libpthread, it will seg.fault in dlerror().

Does somebody know why? I know it is a bad idea to call dlerror()
without any other dl* call before, but people are doing so ...

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

[-- Attachment #2: dlerror.cc --]
[-- Type: text/plain, Size: 175 bytes --]


/* Compile with g++ dlerror.cc -ldl -lpthread */

#include <dlfcn.h>
#include <iostream>

int
main ()
{
  std::cerr << "vor dlerror" << std::endl;
  dlerror();
  return 0;
}

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

end of thread, other threads:[~2003-07-31 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 14:28 C++/dlerror/pthread problem Thorsten Kukuk
2003-07-31 16:28 ` David Mosberger
2003-07-31 17:16 ` [PATCH] Fix dlerror (was Re: C++/dlerror/pthread problem) Jakub Jelinek

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