Bug 18767 - ASAN attach crash - 7.9 regression
Summary: ASAN attach crash - 7.9 regression
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 7.10
Assignee: Jan Kratochvil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-03 20:58 UTC by Jan Kratochvil
Modified: 2015-08-25 15:46 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 Jan Kratochvil 2015-08-03 20:58:51 UTC
-fsanitize=address
gdb.base/attach-pie-noexec.exp

==32586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200004ed90 at pc 0x48ad50 bp 0x7ffceb3aef50 sp 0x7ffceb3aef20
READ of size 2 at 0x60200004ed90 thread T0
    #0 0x48ad4f in __interceptor_strlen (/home/jkratoch/redhat/gdb-test-asan/gdb/gdb+0x48ad4f)
    #1 0xeafe5c in xstrdup xstrdup.c:33
    #2 0x85e024 in attach_command /home/jkratoch/redhat/gdb-test-asan/gdb/infcmd.c:2680

regressed by:

commit 6c4486e63f7583ed85a0c72841f6ccceebbf858e
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Oct 17 13:31:26 2014 +0100
    PR gdb/17471: Repeating a background command makes it foreground
Comment 1 Jan Kratochvil 2015-08-03 21:02:47 UTC
[patch] ASAN attach crash - 7.9 regression [Re: [PATCH 4/4] PR gdb/17471: Repeating a background command makes it foreground]
https://sourceware.org/ml/gdb-patches/2015-08/msg00052.html
Comment 2 Sourceware Commits 2015-08-04 11:44:03 UTC
The master branch has been updated by Jan Kratochvil <jkratoch@sourceware.org>:

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

commit 978b9495b78054b76052a09064cae8c94a58b93e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 4 13:40:44 2015 +0200

    ASAN attach crash - 7.9 regression
    
    -fsanitize=address
    gdb.base/attach-pie-noexec.exp
    
    ==32586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200004ed90 at pc 0x48ad50 bp 0x7ffceb3aef50 sp 0x7ffceb3aef20
    READ of size 2 at 0x60200004ed90 thread T0
        #0 0x48ad4f in __interceptor_strlen (/home/jkratoch/redhat/gdb-test-asan/gdb/gdb+0x48ad4f)
        #1 0xeafe5c in xstrdup xstrdup.c:33
        #2 0x85e024 in attach_command /home/jkratoch/redhat/gdb-test-asan/gdb/infcmd.c:2680
    
    regressed by:
    
    commit 6c4486e63f7583ed85a0c72841f6ccceebbf858e
    Author: Pedro Alves <palves@redhat.com>
    Date:   Fri Oct 17 13:31:26 2014 +0100
        PR gdb/17471: Repeating a background command makes it foreground
    
    gdb/ChangeLog
    2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/18767
    	* infcmd.c (attach_command): Move ARGS_CHAIN cleanup after last ARGS
    	use.
Comment 3 Jan Kratochvil 2015-08-04 11:49:50 UTC
Checked in master + 7.10.
Comment 4 Sourceware Commits 2015-08-25 15:46:54 UTC
The gdb-7.10-branch branch has been updated by Jan Kratochvil <jkratoch@sourceware.org>:

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

commit fa68327bb429223d98887fa43db67fbb49629eb1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 4 13:40:44 2015 +0200

    ASAN attach crash - 7.9 regression
    
    -fsanitize=address
    gdb.base/attach-pie-noexec.exp
    
    ==32586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200004ed90 at pc 0x48ad50 bp 0x7ffceb3aef50 sp 0x7ffceb3aef20
    READ of size 2 at 0x60200004ed90 thread T0
        #0 0x48ad4f in __interceptor_strlen (/home/jkratoch/redhat/gdb-test-asan/gdb/gdb+0x48ad4f)
        #1 0xeafe5c in xstrdup xstrdup.c:33
        #2 0x85e024 in attach_command /home/jkratoch/redhat/gdb-test-asan/gdb/infcmd.c:2680
    
    regressed by:
    
    commit 6c4486e63f7583ed85a0c72841f6ccceebbf858e
    Author: Pedro Alves <palves@redhat.com>
    Date:   Fri Oct 17 13:31:26 2014 +0100
        PR gdb/17471: Repeating a background command makes it foreground
    
    gdb/ChangeLog
    2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/18767
    	* infcmd.c (attach_command): Move ARGS_CHAIN cleanup after last ARGS
    	use.