Bug 16626 - auto-load regression: gdb uses wrong file to test safeness
Summary: auto-load regression: gdb uses wrong file to test safeness
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.7
: P2 normal
Target Milestone: 7.7
Assignee: Jan Kratochvil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-23 23:18 UTC by Doug Evans
Modified: 2014-05-05 21:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Evans 2014-02-23 23:18:08 UTC
Patch 5b2bf9471f1499bee578fcd60c05afe85794e280 introduced a regression where gdb is using the wrong file to test for safeness for auto-loading.

Further details and fix here:

https://sourceware.org/ml/gdb-patches/2014-02/msg00712.html
Comment 1 cvs-commit@gcc.gnu.org 2014-02-25 17:34:53 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  849c862eb2637990692ffe31d16dc779f9bf30c5 (commit)
      from  e2f0d509b33e91abf99978af5fe8d45240550c35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=849c862eb2637990692ffe31d16dc779f9bf30c5

commit 849c862eb2637990692ffe31d16dc779f9bf30c5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Feb 25 18:32:32 2014 +0100

    PR gdb/16626
    
    Fix auto-load 7.7 regression,
    the regression affects any loading from /usr/share/gdb/auto-load .
    
    5b2bf9471f1499bee578fcd60c05afe85794e280 is the first bad commit
    commit 5b2bf9471f1499bee578fcd60c05afe85794e280
    Author: Doug Evans <xdje42@gmail.com>
    Date:   Fri Nov 29 21:29:26 2013 -0800
        Move .debug_gdb_script processing to auto-load.c.
        Simplify handling of auto-loaded objfile scripts.
    
    Fedora 20 x86_64
    $ gdb -q /usr/lib64/libgobject-2.0.so
    Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from
    /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done.
    done.
    (gdb) _
    
    Fedora Rawhide x86_64
    $ gdb -q /usr/lib64/libgobject-2.0.so
    Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from
    /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done.
    done.
    warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path'
    set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
    To enable execution of this file add
            add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    line to your configuration file "/home/jkratoch/.gdbinit".
    To completely disable this security protection add
            set auto-load safe-path /
    line to your configuration file "/home/jkratoch/.gdbinit".
    For more information about this security protection see the
    "Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
            info "(gdb)Auto-loading safe path"
    (gdb) _
    
    That is it tries to load "forbidden"
    	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    but it should load instead
    	/usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py*
    Although that is also not exactly this way, there does not exist any
    	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    despite regressed GDB says so.
    
    gdb/
    2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* auto-load.c (auto_load_objfile_script_1): Change filename to
    	debugfile.
    
    gdb/testsuite/
    2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* gdb.base/auto-load-script: New file.
    	* gdb.base/auto-load.c: New file.
    	* gdb.base/auto-load.exp: New file.
    
    Message-ID: <20140223212400.GA8831@host2.jankratochvil.net>

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                           |    6 ++++
 gdb/auto-load.c                         |    6 ++--
 gdb/testsuite/ChangeLog                 |    7 +++++
 gdb/testsuite/gdb.base/auto-load-script |   17 +++++++++++++
 gdb/testsuite/gdb.base/auto-load.c      |   22 ++++++++++++++++
 gdb/testsuite/gdb.base/auto-load.exp    |   41 +++++++++++++++++++++++++++++++
 6 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/auto-load-script
 create mode 100644 gdb/testsuite/gdb.base/auto-load.c
 create mode 100644 gdb/testsuite/gdb.base/auto-load.exp
Comment 2 cvs-commit@gcc.gnu.org 2014-02-25 17:38:48 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, gdb-7.7-branch has been updated
       via  5b91e80ee94bc100df71fab5472f8adb2c9a88fd (commit)
      from  599c9f426594b797936729edd55081841840526c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5b91e80ee94bc100df71fab5472f8adb2c9a88fd

commit 5b91e80ee94bc100df71fab5472f8adb2c9a88fd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Feb 25 18:32:32 2014 +0100

    PR gdb/16626
    
    Fix auto-load 7.7 regression,
    the regression affects any loading from /usr/share/gdb/auto-load .
    
    5b2bf9471f1499bee578fcd60c05afe85794e280 is the first bad commit
    commit 5b2bf9471f1499bee578fcd60c05afe85794e280
    Author: Doug Evans <xdje42@gmail.com>
    Date:   Fri Nov 29 21:29:26 2013 -0800
        Move .debug_gdb_script processing to auto-load.c.
        Simplify handling of auto-loaded objfile scripts.
    
    Fedora 20 x86_64
    $ gdb -q /usr/lib64/libgobject-2.0.so
    Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from
    /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done.
    done.
    (gdb) _
    
    Fedora Rawhide x86_64
    $ gdb -q /usr/lib64/libgobject-2.0.so
    Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from
    /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done.
    done.
    warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path'
    set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
    To enable execution of this file add
            add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    line to your configuration file "/home/jkratoch/.gdbinit".
    To completely disable this security protection add
            set auto-load safe-path /
    line to your configuration file "/home/jkratoch/.gdbinit".
    For more information about this security protection see the
    "Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
            info "(gdb)Auto-loading safe path"
    (gdb) _
    
    That is it tries to load "forbidden"
    	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    but it should load instead
    	/usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py*
    Although that is also not exactly this way, there does not exist any
    	/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
    despite regressed GDB says so.
    
    gdb/
    2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* auto-load.c (auto_load_objfile_script_1): Change filename to
    	debugfile.
    
    gdb/testsuite/
    2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* gdb.base/auto-load-script: New file.
    	* gdb.base/auto-load.c: New file.
    	* gdb.base/auto-load.exp: New file.
    
    Message-ID: <20140223212400.GA8831@host2.jankratochvil.net>

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                           |    6 ++++
 gdb/auto-load.c                         |    6 ++--
 gdb/testsuite/ChangeLog                 |    7 +++++
 gdb/testsuite/gdb.base/auto-load-script |   17 +++++++++++++
 gdb/testsuite/gdb.base/auto-load.c      |   22 ++++++++++++++++
 gdb/testsuite/gdb.base/auto-load.exp    |   41 +++++++++++++++++++++++++++++++
 6 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/auto-load-script
 create mode 100644 gdb/testsuite/gdb.base/auto-load.c
 create mode 100644 gdb/testsuite/gdb.base/auto-load.exp
Comment 3 Jan Kratochvil 2014-02-25 17:40:01 UTC
Checked in:
        849c862eb2637990692ffe31d16dc779f9bf30c5
and for gdb-7.7-branch:
        5b91e80ee94bc100df71fab5472f8adb2c9a88fd
Comment 4 cvs-commit@gcc.gnu.org 2014-02-25 19:48:40 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  71b7d793371c3cff599c3329c5f3205240117731 (commit)
      from  b9e795ee5549c36dedd086c202f8aa3534c4b770 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=71b7d793371c3cff599c3329c5f3205240117731

commit 71b7d793371c3cff599c3329c5f3205240117731
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Feb 25 20:47:09 2014 +0100

    PR gdb/16626
    
    gdb/testsuite/
    2014-02-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* gdb.base/auto-load.exp: Fix out-of-srctree run.
    
    Message-ID: <87k3cjt3jl.fsf@fleche.redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 gdb/testsuite/ChangeLog              |    3 +++
 gdb/testsuite/gdb.base/auto-load.exp |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
Comment 5 cvs-commit@gcc.gnu.org 2014-02-25 19:50:07 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, gdb-7.7-branch has been updated
       via  c9789545976ff88efbab71c8edd1ea8f65462904 (commit)
      from  5b91e80ee94bc100df71fab5472f8adb2c9a88fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c9789545976ff88efbab71c8edd1ea8f65462904

commit c9789545976ff88efbab71c8edd1ea8f65462904
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Feb 25 20:47:09 2014 +0100

    PR gdb/16626
    
    gdb/testsuite/
    2014-02-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/16626
    	* gdb.base/auto-load.exp: Fix out-of-srctree run.
    
    Message-ID: <87k3cjt3jl.fsf@fleche.redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 gdb/testsuite/ChangeLog              |    3 +++
 gdb/testsuite/gdb.base/auto-load.exp |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
Comment 6 cvs-commit@gcc.gnu.org 2014-05-05 21:54:13 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The annotated tag, gdb-7.7.1-release has been created
        at  af2cd04ccdd7631f4009b2aef5c8402b97d732e6 (tag)
   tagging  4bd8fc3a1362970d9800a263987af8093798338b (commit)
  replaces  gdb-7.7-release
 tagged by  Joel Brobecker
        on  Mon May 5 14:53:19 2014 -0700

- Log -----------------------------------------------------------------
GDB 7.7.1 Release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iEYEABECAAYFAlNoCE8ACgkQku2wS/8yXPMbgQCgiCmLYGN3tjnqEEc0Y0i4iCHj
RN8AnRgphFx5RnfZ5TSUHgC6mVHel7sC
=xfEO
-----END PGP SIGNATURE-----

Eli Zaretskii (1):
      PR gdb/14018 -- avoid "PC register not available" errors.

GDB Administrator (88):
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in
      Automatic date update in version.in

Jan Kratochvil (3):
      Fix Python stack corruption
      PR gdb/16626
      PR gdb/16626

Joel Brobecker (3):
      Document the GDB 7.7 release in gdb/ChangeLog
      Bump GDB version number to 7.7.0.DATE-cvs.
      Set GDB version number to 7.7.1.

Nick Clifton (1):
      Following up on Tom's suggestion I am checking in a patch to replace the various

Pedro Alves (3):
      Make sure we don't resume the stepped thread by accident.
      PR gdb/16575: stale breakpoint instructions in the code cache
      AIX 32-bit core loading, high section addresses.

Pierre Langlois (1):
      Erroneous backtrace on AVR.

Rainer Orth (1):
      PR build/16550

-----------------------------------------------------------------------