httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47178] New: ab segfaults when called with a large -n parameter
Date Sun, 10 May 2009 21:59:01 GMT
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: bugs@httpd.apache.org
        ReportedBy: oss@phihag.de


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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message