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/21956] New: Unbounded stack allocation in pthread_rwlock_rdlock


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

            Bug ID: 21956
           Summary: Unbounded stack allocation in pthread_rwlock_rdlock
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aurelien at aurel32 dot net
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
              Host: mipsel-unknown-linux-gnu
            Target: mipsel-unknown-linux-gnu
             Build: mipsel-unknown-linux-gnu

Since commit cc25c8b4c1 ("New pthread rwlock that is more scalable.") the futex
syscall is used in a loop. It takes 6th arguments. On mips o32, the first four
are passed in registers while the last two are passed on the stack. The current
code in sysdeps/unix/sysv/linux/mips/mips32/sysdep.h uses an alloca(4) call to
force the use of a frame pointer. This allocates an unbounded amounts of stack.

This is the reason why nptl/tst-rwlock15 now fails with a segmentation fault.

-- 
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]