This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17573] New: stpcpy / mempcpy namespace


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

            Bug ID: 17573
           Summary: stpcpy / mempcpy namespace
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com

Various glibc functions call __stpcpy and __mempcpy for namespace reasons
instead of plain stpcpy and mempcpy.  But __stpcpy and __mempcpy are macros
that call __builtin_stpcpy and __builtin_mempcpy, and unless GCC optimizes the
calls, they end up calling the C functions stpcpy and mempcpy.

For calls from within shared libc, libc_hidden_builtin_proto ensures that calls
to those C functions are in turn mapped to call __GI_stpcpy and __GI_mempcpy. 
However, for static libc, and for calls from shared libraries other than libc,
the ELF symbols stpcpy and mempcpy end up getting called, breaking the ISO C
namespace (in the case of stpcpy) or glibc conventions about not relying on the
"future library directions" reservations (in the case of mempcpy).

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]