public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/42829] New: TLS detection in ./configure is wrong.
@ 2010-01-21 15:41 jos dot de_laender at telenet dot be
2010-01-21 15:42 ` [Bug libgomp/42829] " jos dot de_laender at telenet dot be
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jos dot de_laender at telenet dot be @ 2010-01-21 15:41 UTC (permalink / raw)
To: gcc-bugs
In attachment, you find the code that is used inside the configure m4 macro for
detecting the presence of TLS.
This check is unreliable.
When compiled with -O2 (as done in configure) the result might be that the
compiler reports same adress due to optimization and decides there is no TLS.
When compiled with -O0, it yields the correct result.
This is an optimization artefact. Please extend the test with the two lines I
put in comment. This way the test succeeds correctly, even after optimization.
--
Summary: TLS detection in ./configure is wrong.
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jos dot de_laender at telenet dot be
GCC host triplet: i686-pc-mingw32
GCC target triplet: mingw64 - see description.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
@ 2010-01-21 15:42 ` jos dot de_laender at telenet dot be
2010-01-21 19:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jos dot de_laender at telenet dot be @ 2010-01-21 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jos dot de_laender at telenet dot be 2010-01-21 15:42 -------
Created an attachment (id=19681)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19681&action=view)
The test.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
2010-01-21 15:42 ` [Bug libgomp/42829] " jos dot de_laender at telenet dot be
@ 2010-01-21 19:49 ` pinskia at gcc dot gnu dot org
2010-01-21 20:37 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-01-21 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2010-01-21 19:48 -------
Oh this test should pass no matter what really as TLS is emulated on mingw via
functions which call pthreads.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
2010-01-21 15:42 ` [Bug libgomp/42829] " jos dot de_laender at telenet dot be
2010-01-21 19:49 ` pinskia at gcc dot gnu dot org
@ 2010-01-21 20:37 ` jakub at gcc dot gnu dot org
2010-01-21 22:14 ` jos dot de_laender at telenet dot be
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-21 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-01-21 20:37 -------
Yeah, the test is certainly fine, if it sporadically fails, there are issues
with the mingw TLS or thread implementation (or both).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
` (2 preceding siblings ...)
2010-01-21 20:37 ` jakub at gcc dot gnu dot org
@ 2010-01-21 22:14 ` jos dot de_laender at telenet dot be
2010-01-23 10:35 ` ktietz at gcc dot gnu dot org
2010-06-11 8:38 ` iains at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jos dot de_laender at telenet dot be @ 2010-01-21 22:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jos dot de_laender at telenet dot be 2010-01-21 22:14 -------
Your call.
I *don't* think it's fine.
Even if there *is* TLS, it can fail due to the -O2 optimizing.
(it doesn't detect the referring via &).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
` (3 preceding siblings ...)
2010-01-21 22:14 ` jos dot de_laender at telenet dot be
@ 2010-01-23 10:35 ` ktietz at gcc dot gnu dot org
2010-06-11 8:38 ` iains at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2010-01-23 10:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ktietz at gcc dot gnu dot org 2010-01-23 10:35 -------
Yes, I can confirm this issue, but want to investigate where the underlying
issue really comes from. The interesting issue I found is, that if a
TLS-variable isn't assigned, the values of the addresses in different threads
are equal. As soon as one thread initialize the variable in program flow (not
by initializing the global __thread variable), everthing works as expected.
Kai
--
ktietz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgomp/42829] TLS detection in ./configure is wrong.
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
` (4 preceding siblings ...)
2010-01-23 10:35 ` ktietz at gcc dot gnu dot org
@ 2010-06-11 8:38 ` iains at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-06-11 8:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from iains at gcc dot gnu dot org 2010-06-11 08:37 -------
closing as fixed by r160457 (trunk) and r160526 (4.5 release branch)
--
iains at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42829
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-11 8:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 15:41 [Bug libgomp/42829] New: TLS detection in ./configure is wrong jos dot de_laender at telenet dot be
2010-01-21 15:42 ` [Bug libgomp/42829] " jos dot de_laender at telenet dot be
2010-01-21 19:49 ` pinskia at gcc dot gnu dot org
2010-01-21 20:37 ` jakub at gcc dot gnu dot org
2010-01-21 22:14 ` jos dot de_laender at telenet dot be
2010-01-23 10:35 ` ktietz at gcc dot gnu dot org
2010-06-11 8:38 ` iains at gcc dot gnu dot org
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).