public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4372: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread
@ 2003-01-14 23:10 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-01-14 23:10 UTC (permalink / raw)
To: carlo, gcc-bugs, gcc-prs, nobody
Synopsis: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread
State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Tue Jan 14 15:10:22 2003
State-Changed-Why:
No feedback (at least not in audit trail)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4372
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c/4372: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread
@ 2003-01-15 0:26 Carlo Wood
0 siblings, 0 replies; 2+ messages in thread
From: Carlo Wood @ 2003-01-15 0:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/4372; it has been noted by GNATS.
From: Carlo Wood <carlo@alinoe.com>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c/4372: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread
Date: Wed, 15 Jan 2003 01:23:32 +0100
On Tue, Jan 14, 2003 at 11:10:22PM -0000, bangerth@dealii.org wrote:
> Synopsis: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread
>
> State-Changed-From-To: feedback->closed
> State-Changed-By: bangerth
> State-Changed-When: Tue Jan 14 15:10:22 2003
> State-Changed-Why:
> No feedback (at least not in audit trail)
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4372
Well, open it again because yes - this problem still exists with 3.2.1.
>g++ test.cc -o test
>./test
Segmentation fault
and
>g++ test.cc -o test -lpthread
>./test
>
I don't understand why you needed to feedback though.
The small test case is simple enough, no?
Still,
>cat test.cc
#include <iosfwd>
#include <pthread.h>
static pthread_once_t S_key_once;
static pthread_key_t S_key;
void S_destroy(void* tsd_ptr) throw()
{
}
void S_alloc_key(void) throw()
{
pthread_key_create(&S_key, S_destroy);
}
int main(void)
{
pthread_once(&S_key_once, S_alloc_key);
}
--
Carlo Wood <carlo@alinoe.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-15 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 23:10 c/4372: #pragma weak pthread* inclusion causes applications to crash without a linker error when one forgets to link with -lpthread bangerth
2003-01-15 0:26 Carlo Wood
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).