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 stdio/20249] New: vfprintf uses too much stack space


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

            Bug ID: 20249
           Summary: vfprintf uses too much stack space
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

Bug 20248 notes vfprintf uses too much stack space:

printf calls vfprintf (~1760 bytes of stack space), vfprintf calls
buffered_vfprintf (~8592 bytes of stack space), and this calls vfprintf again
(~1760 bytes of stack space).  Total space requirement is around 12 KiB.

We should rearrange things so that the second vfprintf stack frame is not
needed, and reduce the buffer size in buffered_vfprintf.

I think it is reasonable to assume that you can call fprintf on an unbuffered
stream while having a buffer of BUFSIZ on the stack, from a thread which has a
PTHREAD_STACK_MIN stack allocation.  On some architectures, the numbers
currently do not allwo this.

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