A
Aleksandar Kuktin
Hello all.
I'm debugging Polipo, a HTTP proxy whose source code repository is here:
http://git.wifi.pps.univ-paris-diderot.fr/?p=polipo.git;a=summary
A poster on polipo-users list posted a backtrace from a core dump
generated in a crash. At the bottom of the trace is the following which I
can not wrap my mind about:
#104808 0x0805994f in httpClientHandlerHeaders (event=0x9ce1ca8,
srequest=0x9ce1cb8, connection=0x9d2b638) at client.c:666
666 return httpClientRequest(request, url);
#104809 0x08059a89 in httpClientHandler (status=0, event=0x9ce1ca8,
request=0x9ce1cb8) at client.c:392
392 httpClientHandlerHeaders(event, request, connection);
#104810 0x0804bf64 in do_scheduled_stream (status=0, event=0x9ce1ca8)
at io.c:282
282 done = request->handler(-ENOMEM, event,
request);
The function call in io.c, on line 282 calls the function with the first
argument being -ENOMEM but the trace entry which corresponds to the
function thus called has 0 as its first argument. Furthermore, the next
entry in the trace proves httpClientHandler() behaved as if its first
argument really was 0.
I can see only three possibilities. One: the trace is invalid. No idea
how would that happen. Two: ENOMEM is defined as 0. This option is
virtually impossible. Three: the stack was smashed somewhere at some
time. But I have a very hard time fitting that explanation with
everything else.
I'm debugging Polipo, a HTTP proxy whose source code repository is here:
http://git.wifi.pps.univ-paris-diderot.fr/?p=polipo.git;a=summary
A poster on polipo-users list posted a backtrace from a core dump
generated in a crash. At the bottom of the trace is the following which I
can not wrap my mind about:
#104808 0x0805994f in httpClientHandlerHeaders (event=0x9ce1ca8,
srequest=0x9ce1cb8, connection=0x9d2b638) at client.c:666
666 return httpClientRequest(request, url);
#104809 0x08059a89 in httpClientHandler (status=0, event=0x9ce1ca8,
request=0x9ce1cb8) at client.c:392
392 httpClientHandlerHeaders(event, request, connection);
#104810 0x0804bf64 in do_scheduled_stream (status=0, event=0x9ce1ca8)
at io.c:282
282 done = request->handler(-ENOMEM, event,
request);
The function call in io.c, on line 282 calls the function with the first
argument being -ENOMEM but the trace entry which corresponds to the
function thus called has 0 as its first argument. Furthermore, the next
entry in the trace proves httpClientHandler() behaved as if its first
argument really was 0.
I can see only three possibilities. One: the trace is invalid. No idea
how would that happen. Two: ENOMEM is defined as 0. This option is
virtually impossible. Three: the stack was smashed somewhere at some
time. But I have a very hard time fitting that explanation with
everything else.