public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Thorsten Kukuk <kukuk@suse.de>
To: libc-hacker@sources.redhat.com
Subject: C++/dlerror/pthread problem
Date: Thu, 31 Jul 2003 14:28:00 -0000	[thread overview]
Message-ID: <20030731142801.GA9594@suse.de> (raw)

[-- 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;
}

             reply	other threads:[~2003-07-31 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 14:28 Thorsten Kukuk [this message]
2003-07-31 16:28 ` David Mosberger
2003-07-31 17:16 ` [PATCH] Fix dlerror (was Re: C++/dlerror/pthread problem) Jakub Jelinek

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=20030731142801.GA9594@suse.de \
    --to=kukuk@suse.de \
    --cc=libc-hacker@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).