https://issues.apache.org/bugzilla/show_bug.cgi?id=47178

           Summary: ab segfaults when called with a large -n parameter
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: support
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=23637)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23637)
Patch adding a check of the result of the allocation of stats

Calling ab (the Apache benchmark utility) with the argument -n 1234567890
http://example.org (or any -n other value smaller than MAXINT, but bigger than
the virtual memory divided by 32) causes ab to segfault. This is a result of
using a dynamically allocated data structure(line ~1260) whose allocation(line
1559) is not checked. The size of this data structure is linearly dependent of
the -n value. This may be a design bug in itself since it prevents ab runs with
a potentially infinite number of requests, e.g. to test how many requests can
be served in 42 seconds. The attached patch makes ab exit properly when the
memory allocation fails.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to