Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>, drow@false.org
Cc: Denis PILAT <denis.pilat@st.com>
Subject: Re: [RFA] gdbserver with reversed arguments seg. fault
Date: Wed, 03 Jan 2007 15:02:00 -0000	[thread overview]
Message-ID: <459BC56E.6010506@st.com> (raw)
In-Reply-To: <20070103144423.GB12452@nevyn.them.org>

Daniel Jacobowitz wrote:
> On Wed, Jan 03, 2007 at 10:29:49AM +0100, Denis PILAT wrote:
>   
>> Hi,
>>
>> Following our discussion in the thread 
>> http://sources.redhat.com/ml/gdb-patches/2007-01/msg00059.html
>> I'm proposing the attached patch to fix a segmentation fault that occurs 
>> into gdbserver when you revert the binary filename with the "host:port" 
>> argument.
>> In inferiors.c the inferior_target_data() function is called with a NULL 
>> pointer argument. At the beginning I though of testing arguments but 
>> none of them are tested in this whole file so I concluded it's up to the 
>> caller to do so.
>>     
>
> What exactly did you do to get this crash?  What's the backtrace look
> like?  It didn't happen for me.
>
>   
Here is the output :
  > ./gdbserver ~/tmp/hello/hello.out :2222
  Cannot exec :2222: No such file or directory.
  Process :2222 created; pid = 25945

  Child exited with retcode = 7f
  Could not open remote device: Invalid argument.
  Killing inferior
  Segmentation fault (core dumped)

Here is the backtrace:
  Program received signal SIGSEGV, Segmentation fault.
  inferior_target_data (inferior=0x0)
      at 
/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/gdb/gdb/gdbserver/inferiors.c:227
  227     {
  (gdb) bt
  #0  inferior_target_data (inferior=0x0)
      at 
/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/gdb/gdb/gdbserver/inferiors.c:227
  #1  0x0804e2a9 in main (argc=3, argv=0xbfff9414)
      at 
/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/gdb/gdb/gdbserver/server.c:620




  reply	other threads:[~2007-01-03 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03  9:30 Denis PILAT
2007-01-03 14:44 ` Daniel Jacobowitz
2007-01-03 15:02   ` Denis PILAT [this message]
2007-01-03 17:58 ` Daniel Jacobowitz

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=459BC56E.6010506@st.com \
    --to=denis.pilat@st.com \
    --cc=drow@false.org \
    --cc=gdb-patches@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