This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18052] Symbol clash with preprocessor __i686 produces segfaults.
- From: "jparmele at wildbear dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 28 Feb 2015 00:23:08 +0000
- Subject: [Bug libc/18052] Symbol clash with preprocessor __i686 produces segfaults.
- Auto-submitted: auto-generated
- References: <bug-18052-131 at http dot sourceware dot org/bugzilla/>
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.