Re: Help: libcurl debug
Date: Fri, 15 May 2020 02:56:46 +0530
Hi Team,
Belwo is the whole story regarding libcurl usage and issue: please guide
for the same !
//some crash is happening as shown below
point1 ; gdb) bt
> #0 0xb66e8ee4 in strlen () from /lib/libc.so.6
> #1 0xb6da3854 in ?? () from /opt/qcom/lib/libcurl.so.4
> #2 ---Type <return> to continue, or q <return> to quit--
//Detailed reagaring CURL usage in my application
Point2: below is the sequence of functions I am executing and 2nd one is
executing 5 time approx
1.curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
2.curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
ipr_cwmp_WriteMemoryCallback); //each time this functions is enter and exit
3. curl_easy_setopt(curl, CURLOPT_WRITEDATA,(void *)&chunk);
Note: Below is the detailed of my custom functions same as reference from
curl documentation:
size_t ipr_cwmp_WriteMemoryCallback(void *contents,
128 size_t size,
129 size_t nmemb,
130 void *userp)
131 {
132 /* debug fix start */
133 TRACE(LOG_CRITICAL , HTTP_CONNECTION, " debug 23
ipr_cwmp_WriteMemoryCallback\n");
134 /* debug fix end */
135 size_t realsize = size * nmemb;
136 struct MemoryStruct *mem = (struct MemoryStruct *)userp;
137 mem->memory = TR_REALLOC(mem->memory, mem->size + realsize + 1 );
138
139 //if(mem->memory == PNULL)
140 //mem->memory = calloc(1,2000);
141
142 TRACE (LOG_DETAIL , HTTP_CONNECTION, "Entering in %s
",__FUNCTION__);
143 if (mem->memory == PNULL)
144 {
145 /* out of memory! */
146 TRACE (LOG_CRITICAL , HTTP_CONNECTION, "Exiting in %s
",__FUNCTION__);
147 exit(EXIT_FAILURE);
148 }
149 ENB_MEMCPY(&(mem->memory[mem->size]), contents, realsize);
150 mem->size += realsize;
151 mem->memory[mem->size] = 0;
152 TRACE (LOG_DETAIL , HTTP_CONNECTION, "Exiting in %s ",__FUNCTION__);
153 return realsize;
154 }
On Fri, May 15, 2020 at 2:12 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 14 May 2020, Kunal Chauhan via curl-library wrote:
>
> > 1.My code that is using " libcurl.so.4 " and some crash is happening in
> > application that is using libcurl.so.4
>
> That's the main SONAME number we've used since 2006. So yes, that's the
> name
> of the shared libcurl version used by everyone.
>
> You should rather tell us:
>
> 1. which libcurl version you're using (the full curl -V output is useful)
> 2. what you did that caused the issue
>
> > 2. It showing in gdb and last frame is showing some strlen+36.
>
> Unfortunately that doesn't help anyone much. Either you didn't use libcurl
> correctly in your application or perhaps there's a libcurl bug you ran
> into.
>
> With need MANY more details to be able to help.
>
> --
>
> / daniel.haxx.se | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
>
-- *Thanks with Regards!* *Kunal Chauhan* *Mob:09813614826* *Mob:08860397903* *E-mail:atkunalchauhan_at_gmail.com <E-mail%3Aatkunalchauhan_at_gmail.com>*
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-14