public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18052] New: Symbol clash with preprocessor __i686  produces segfaults.
@ 2015-02-27 22:53 jparmele at wildbear dot com
  2015-02-27 23:13 ` [Bug libc/18052] " joseph at codesourcery dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jparmele at wildbear dot com @ 2015-02-27 22:53 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

            Bug ID: 18052
           Summary: Symbol clash with preprocessor __i686  produces
                    segfaults.
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jparmele at wildbear dot com
                CC: drepper.fsp at gmail dot com

Created attachment 8155
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8155&action=edit
patch for glibc-2.21

This was fixed before so this is a regression.  Don't use __i686 as a separable
part of a symbol because the preprocessor defines it.  This causes failures
when attempting to use glibc.  I saw the problem as a segfault when the install
tried to run sln.  Patch is to sed out such symbols from glibc-2.21.  Patch was
created by a acript fix_asm which finds such symbols in .S and .h files.  Patch
for glibc-2.21 is included as an attachment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
@ 2015-02-27 23:13 ` joseph at codesourcery dot com
  2015-02-28  0:23 ` jparmele at wildbear dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: joseph at codesourcery dot com @ 2015-02-27 23:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
You'll need to explain why the

#if defined __i686 && defined __ASSEMBLER__
#undef __i686
#define __i686 __i686
#endif

isn't working for you.  See the comment above that for why your proposed 
renaming is undesirable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
  2015-02-27 23:13 ` [Bug libc/18052] " joseph at codesourcery dot com
@ 2015-02-28  0:23 ` jparmele at wildbear dot com
  2015-03-02 10:00 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jparmele at wildbear dot com @ 2015-02-28  0:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #2 from jparmele at wildbear dot com ---
On Fri, 27 Feb 2015, joseph at codesourcery dot com wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=18052
>
> --- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
> You'll need to explain why the
>
> #if defined __i686 && defined __ASSEMBLER__
> #undef __i686
> #define __i686 __i686
> #endif
>
> isn't working for you.  See the comment above that for why your proposed
> renaming is undesirable.
>
> -- 
> You are receiving this mail because:
> You reported the bug.
>

The problem is not that the preprocessor has defined __i686.  The problem
appears because symbols needed in glibc will be mangled by the preprocessor
which defines __i686 (for example 1) if you use __i686 internally (for
example __i686.get_pc_thunk.bx) in such a way that the preprocessor will
substitute __i686 in the symbol name.  Replacing the .  with _ prevents this
because . is not a valid identifier character and _ is.  I saw this problem
because I have a pentium4 processor which causes __i686 to be defined.

As to why the code above fails I would guess that __ASSEMBLER__  is not
always defined but that's a guess.  It is a fact that I became aware of this
problem when I disassembled sln and found one of these symbols.  With the
patch sln builds correclty.  Without it, sln segfaults.

Best regards,

Joseph Parmelee

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
  2015-02-27 23:13 ` [Bug libc/18052] " joseph at codesourcery dot com
  2015-02-28  0:23 ` jparmele at wildbear dot com
@ 2015-03-02 10:00 ` schwab@linux-m68k.org
  2015-03-02 10:02 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-02 10:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (2 preceding siblings ...)
  2015-03-02 10:00 ` schwab@linux-m68k.org
@ 2015-03-02 10:02 ` schwab@linux-m68k.org
  2015-03-04  1:38 ` jparmele at wildbear dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-02 10:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
Please show exactly how it is failing for you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (3 preceding siblings ...)
  2015-03-02 10:02 ` schwab@linux-m68k.org
@ 2015-03-04  1:38 ` jparmele at wildbear dot com
  2015-03-04 10:04 ` schwab@linux-m68k.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jparmele at wildbear dot com @ 2015-03-04  1:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #4 from jparmele at wildbear dot com ---
On Mon, 2 Mar 2015, schwab@linux-m68k.org wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=18052
>
> Andreas Schwab <schwab@linux-m68k.org> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|NEW                         |WAITING
>
> --- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
> Please show exactly how it is failing for you.
>
> -- 
> You are receiving this mail because:
> You reported the bug.
>

I have been quite specific in the report: sln segfaults during install. 
Many reports on internet of segfaults with other apps are likely due to this
problem.  "." should not be used in an identifier because it confuses the
C compiler which tries to interpret it as a structure element operator.

Regards,

Joseph

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (4 preceding siblings ...)
  2015-03-04  1:38 ` jparmele at wildbear dot com
@ 2015-03-04 10:04 ` schwab@linux-m68k.org
  2015-03-04 14:07 ` jparmele at wildbear dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-04 10:04 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
This is about as unspecific as it can get.  The only certain aspect of your
report is that your patch is wrong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (5 preceding siblings ...)
  2015-03-04 10:04 ` schwab@linux-m68k.org
@ 2015-03-04 14:07 ` jparmele at wildbear dot com
  2015-03-04 14:12 ` schwab@linux-m68k.org
  2015-08-24  9:50 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jparmele at wildbear dot com @ 2015-03-04 14:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #6 from jparmele at wildbear dot com ---
On Wed, 4 Mar 2015, schwab@linux-m68k.org wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=18052
>
> --- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
> This is about as unspecific as it can get.  The only certain aspect of your
> report is that your patch is wrong.
>
> -- 
> You are receiving this mail because:
> You reported the bug.
>

Did you intend that __i686 be a structure?  That is what
   #  define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg
tells the compiler.  The patch is misnamed; it's not just about assembly
because this appears in a header file sysdep.h.

Joseph

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (6 preceding siblings ...)
  2015-03-04 14:07 ` jparmele at wildbear dot com
@ 2015-03-04 14:12 ` schwab@linux-m68k.org
  2015-08-24  9:50 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2015-03-04 14:12 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
> Did you intend that __i686 be a structure?  That is what
>    #  define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg
> tells the compiler.

No, it doesn't.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug libc/18052] Symbol clash with preprocessor __i686  produces segfaults.
  2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
                   ` (7 preceding siblings ...)
  2015-03-04 14:12 ` schwab@linux-m68k.org
@ 2015-08-24  9:50 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-08-24  9:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18052

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #8 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Closing for lack of feedback on what specifically happens with the specific
preprocessor directives indicated and why exactly in the submitter's
environment they don't have the desired effect.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2015-08-24  9:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 22:53 [Bug libc/18052] New: Symbol clash with preprocessor __i686 produces segfaults jparmele at wildbear dot com
2015-02-27 23:13 ` [Bug libc/18052] " joseph at codesourcery dot com
2015-02-28  0:23 ` jparmele at wildbear dot com
2015-03-02 10:00 ` schwab@linux-m68k.org
2015-03-02 10:02 ` schwab@linux-m68k.org
2015-03-04  1:38 ` jparmele at wildbear dot com
2015-03-04 10:04 ` schwab@linux-m68k.org
2015-03-04 14:07 ` jparmele at wildbear dot com
2015-03-04 14:12 ` schwab@linux-m68k.org
2015-08-24  9:50 ` jsm28 at gcc dot gnu.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).