public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tes.vik1986 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/27535] amd64-linux-siginfo.c fails to compile after updating to glibc-2.33 headers
Date: Sun, 26 Sep 2021 13:31:33 +0000	[thread overview]
Message-ID: <bug-27535-4717-ytlQ0du1O0@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27535-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27535

Kylan <tes.vik1986 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tes.vik1986 at gmail dot com

--- Comment #12 from Kylan <tes.vik1986 at gmail dot com> ---
This patch fixes a segfault seen when attaching to a process on Solaris.
    The steps leading to the segfault are:
https://komiya-dental.com/computers/huawei-technology/

     - procfs_target::attach calls do_attach, at this point the inferior's
       process slot in the target stack is empty.
http://www-look-4.com/health/winter-sickness/
     - do_attach adds a thread with `add_thread (&the_procfs_target, ptid)`
     - in add_thread_silent, the passed target (&the_procfs_target) is
       passed to find_inferior_ptid
http://www.iu-bloomington.com/health/amoled-display/
     - find_inferior_ptid returns nullptr, as there is no inferior with this
       ptid that has &the_procfs_target as its process target
https://www.webb-dev.co.uk/property/house-sales-in-2020/
     - the nullptr `inf` is passed to find_thread_ptid, which dereferences
       it, causing a segfault
https://waytowhatsnext.com/services/netflix-services/
     - back in procfs_target::attach, after do_attach, we push the
       the_procfs_target on the inferior's target stack, although we never
http://www.acpirateradio.co.uk/tech/forest-fires/
       reach this because the segfault happens before.
    http://www.logoarts.co.uk/technology/robot-vacuums/
    To fix this, I think we need to do the same as is done in
    inf_ptrace_target::attach: push the target early and unpush it in case
    the attach fails (and keep it if the attach succeeds).
http://www.slipstone.co.uk/travel/hyundai-kona/

    Implement it by moving target_unpush_up to target.h, so it can be
http://embermanchester.uk/category/technology/ 
    re-used here.  Make procfs_target::attach use it.  Note that just like
    is mentioned in inf_ptrace_target::attach, we should push the target
http://connstr.net/computers/chargers-tech/ 
    before calling target_pid_to_str, so that calling target_pid_to_str ends
    up in procfs_target::pid_to_str. http://joerg.li/property/latest-suvs/

    Tested by trying to attach on a process on gcc211 on the gcc compile
    farm. To fix this, I think we need to do the same as is done in
http://www.jopspeech.com/tech/xiaomi-headset/
    inf_ptrace_target::attach: push the target early and unpush it in case
    the attach fails (and keep it if the attach succeeds).
    http://www.wearelondonmade.com/tech/driving-assistant/
    Implement it by moving target_unpush_up to target.h, so it can be
    re-used here.  Make procfs_target::attach use it.  Note that just like 
    is mentioned in inf_ptrace_target::attach, we should push the target
    before calling target_pid_to_str, so that calling target_pid_to_str ends
    up in procfs_target::pid_to_str. http://www.compilatori.com/tech/xiaomi/

    Tested by trying to attach on a process on gcc211 on the gcc compile
    farm.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-09-26 13:31 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06 16:25 [Bug build/27535] New: " kevinb at redhat dot com
2021-03-06 16:25 ` [Bug build/27535] " kevinb at redhat dot com
2021-03-06 16:26 ` kevinb at redhat dot com
2021-03-06 17:58 ` cvs-commit at gcc dot gnu.org
2021-03-07  4:44 ` brobecker at gnat dot com
2021-03-07  6:23 ` kevinb at redhat dot com
2021-06-27 17:42 ` ahmedsayeed1982 at yahoo dot com
2021-07-15  7:39 ` lennordocdoc0921 at gmail dot com
2021-08-02  4:15 ` lennordocdoc0921 at gmail dot com
2021-08-19  6:01 ` ucelsanicin at yahoo dot com
2021-09-02 11:07 ` donipah907 at mtlcz dot com
2021-09-02 11:11 ` mark at klomp dot org
2021-09-06  9:09 ` focixujo at livinginsurance dot co.uk
2021-09-10 19:39 ` mehmetgelisin at aol dot com
2021-09-17 12:15 ` richard.aidoo at yahoo dot co.uk
2021-09-22 10:11 ` diheto5497 at secbuf dot com
2021-09-26 13:31 ` tes.vik1986 at gmail dot com [this message]
2021-09-29 15:45 ` seolab.backlinks at gmail dot com
2021-10-07  2:33 ` kasylinks at yahoo dot com
2021-10-09 11:00 ` gulsenenginar at aol dot com
2021-10-10 16:11 ` oficaj3 at gmail dot com
2021-10-19  7:13 ` progonsaytu at gmail dot com
2021-10-23 13:47 ` fiteva5725 at bomoads dot com
2021-10-24 10:01 ` glassmtech at ukr dot net
2021-10-29 12:04 ` sanantoniotileinstallation at gmail dot com
2021-10-30  9:28 ` aisonwrnerxbg15 at gmail dot com
2021-10-31  6:51 ` allowable2001ballmer at gmail dot com
2021-11-01 14:08 ` aleneuuiwb15 at gmail dot com
2021-11-02 11:17 ` antiguans2000antiguans at gmail dot com
2021-11-03  7:54 ` barronwbs85 at gmail dot com
2021-11-04  9:22 ` bahamianiridescent at gmail dot com
2021-11-05 14:19 ` boscoblsxv14 at gmail dot com
2021-11-06  1:45 ` bpbniche at gmail dot com
2021-11-06 11:19 ` great1971greatratt at gmail dot com
2021-11-06 21:12 ` paneki8601 at dukeoo dot com
2021-11-07 12:00 ` great1971greatratt at gmail dot com
2021-11-07 12:10 ` great1971greatratt at gmail dot com
2021-11-08  8:29 ` richardshodges7 at gmail dot com
2021-11-09 11:46 ` johnsjvi95 at gmail dot com
2021-11-11 14:14 ` schaeferkkf25 at gmail dot com
2021-11-12 11:42 ` shannanalt11 at gmail dot com
2021-11-13 17:49 ` raidoo8585 at gmail dot com
2021-11-13 18:06 ` bpbniche at gmail dot com
2021-11-13 19:33 ` tesaso8237 at funboxcn dot com
2021-11-14  3:45 ` brickpavingcl at gmail dot com
2021-11-16 19:04 ` xecana8007 at funboxcn dot com
2021-11-16 19:08 ` xecana8007 at funboxcn dot com
2021-11-16 19:12 ` xecana8007 at funboxcn dot com
2021-11-16 19:15 ` xecana8007 at funboxcn dot com
2021-11-19  6:39 ` aslanelli50 at gmail dot com
2021-11-22  1:02 ` zacmanken at gmail dot com
2021-11-22  1:04 ` zacmanken at gmail dot com
2021-11-22  7:39 ` gexed96894 at keagenan dot com
2021-11-24 10:33 ` nicolas666 at netcourrier dot com
2021-11-25  3:39 ` bpbniche at gmail dot com
2022-01-10  1:45 ` bpbniche at gmail dot com

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=bug-27535-4717-ytlQ0du1O0@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).