>-----Original Message-----
>From: Jeff Trawick [mailto:[EMAIL PROTECTED]
[SNIP]
>
>Mathihalli, Madhusudan wrote:
>> Hi,
>>      If the "-c" option is given a arbitrarily huge value, 
>ab dumps core.
>> (Try: ab -c 2147483647 http://foo.com/)
>
>why does it dump core?  malloc says sure I can give you 2GB 
>but then we 
>segfault trying to access the pages?  or something else?
>

Here's the stack trace:

(gdb) r -c 2147483647 http://foo.com/   
[...]

Breakpoint 1, test () at ab.c:1606
1606        con = calloc(concurrency * sizeof(struct connection), 1);
(gdb) p con
$1 = (struct connection *) 0x0
(gdb) c

Program received signal SIGSEGV, Segmentation fault (si_code: 2).
0x40000000000a14a0:1 in test () at ab.c:1686
1686            con[i].socknum = i;
(gdb) bt
#0  0x40000000000a14a0:1 in test () at ab.c:1686
#1  0x40000000000a55d0:0 in main (argc=4, argv=0x9ffffffffffff400) at ab.c:2215
(gdb) p con
$1 = (struct connection *) 0x0
(gdb) p i
$2 = 0

Reply via email to