This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 libstdc++/70463] New: always use first element of mutex pool in src/c++11/shared_ptr.cc


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70463

            Bug ID: 70463
           Summary: always use first element of mutex pool in
                    src/c++11/shared_ptr.cc
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

From https://bugzilla.redhat.com/show_bug.cgi?id=1315388


    const unsigned char mask = 0xf;

    inline unsigned char key(const void* addr)
    { return _Hash_impl::hash(addr) & mask; }

This always returns 0 when addresses are 4-byte aligned.

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