public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Kunal Chauhan <atkunalchauhan@gmail.com>, gdb@sourceware.org
Subject: Re: [Help/Hint]: gdb output analysis
Date: Thu, 14 May 2020 15:48:35 +0200	[thread overview]
Message-ID: <f6eaef01fc7682684dec82f347408fa17c9dfdef.camel@skynet.be> (raw)
In-Reply-To: <CACEFAc3a5La0x-KeA9cCfXWQY=masVjT0g=meu3=6Tii_KUeRg@mail.gmail.com>

If you get a SEGV in strlen, it is typically because you
call it with a bad pointer (null pointer, not addressable memory, ...)
or with a pointer to a non null terminated string and strlen then
goes too far and reaches an not addressable page.

You should 'Type <return>' to continue and examine the callstack
and the variables/args in the call stack.
As strlen is called by libcurl, you should look at how your application
calls libcurl.

The gdb command
  bt full 
will show you the full stack trace with args and local variables.

Good luck

Philippe

On Thu, 2020-05-14 at 19:06 +0530, Kunal Chauhan via Gdb wrote:
> Hi Team,
> 
> I got some output at gdb with core dump file
> 
> *I have not a clue that how the address shown by gdb can  help me to go to
> exact point of code violation.*
> *please suggest some clue !*
> 
> *Logs by gdb:*
> 
> Core was generated by `/opt/proj/bin/ty 0 0'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0xb66e8ee4 in strlen () from /lib/libc.so.6
> [Current thread is 1 (LWP 2084)]
> (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---
> 
> thanks
> kunal


  reply	other threads:[~2020-05-14 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 13:36 Kunal Chauhan
2020-05-14 13:48 ` Philippe Waroquiers [this message]
2020-05-14 14:15   ` Kunal Chauhan
2020-05-14 19:03     ` Philippe Waroquiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6eaef01fc7682684dec82f347408fa17c9dfdef.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=atkunalchauhan@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).