cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: icc segmentation faults

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 12 Sep 2007 12:28:09 +0200

On 9/11/07, I wrote:
>> #0 0xee4ff2b7 in ?? ()
> #1 0xb7f1baaa in curl_multi_init () at multi.c:358
> #2 0x08049062 in test (URL=0xbffdbc6f
> "http://test.remote.server.com/path/540") at lib540.c:123
> #3 0x0804927f in main (argc=5, argv=0xbffdb2e4) at first.c:85
> (gdb) up
> #1 0xb7f1baaa in curl_multi_init () at multi.c:358
> 358 struct Curl_multi *multi = (void *)calloc(sizeof(struct
> Curl_multi), 1);

The 'calloc' call itself is an illegal address. Valgrind seems to agree:
==21263== Jump to the invalid address stated on the next line
==21263== at 0x2FFF204: ???
==21263== by 0x8049141: test (lib540.c:123)
==21263== by 0x8049366: main (first.c:85)
==21263== Address 0x2FFF204 is not stack'd, malloc'd or (recently) free'd
==21263==
==21263== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==21263== Bad permissions for mapped region at address 0x2FFF204
==21263== at 0x2FFF204: ???
==21263== by 0x8049141: test (lib540.c:123)
==21263== by 0x8049366: main (first.c:85)

Presumably it's been #defined to something else at some stage so the
source at multi.c line 358 isn't what it seems.

BTW the Solaris coredump is different:

#1 0xff116138 in _ndoprnt () from /lib/libc.so.1
#2 0xff118148 in fprintf () from /lib/libc.so.1
#3 0x00011788 in loop (cm=0x25560, url=0xffbffde5
"http://test.remote.server.com/path/540", userpwd=0xffbffe22
"silly:person", headers=0x227b8)
    at lib540.c:94
#4 0x000118e8 in test (URL=0xffbffde5
"http://test.remote.server.com/path/540") at lib540.c:124
#5 0x00011b5c in main (argc=5, argv=0xffbffd14) at first.c:85
..
(gdb) up
#3 0x00011788 in loop (cm=0x25560, url=0xffbffde5
"http://test.remote.server.com/path/540", userpwd=0xffbffe22
"silly:person", headers=0x227b8)
    at lib540.c:94
94 curl_easy_strerror(msg->data.result), usedurl);

'usedurl' is 0x0.
lib540.c line 92 (the previous line) says:
92 curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &usedurl);

But single-stepping through gdb doesn't actually call anything here..
so it's NULL when it hits line 93.

-Tor
Received on 2007-09-12