From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4293 invoked by alias); 3 Jan 2015 18:14:58 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 4265 invoked by uid 48); 3 Jan 2015 18:14:57 -0000 From: "xdje42 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/17785] GDB ignores "disable-randomization" setting once its set to off once Date: Sat, 03 Jan 2015 18:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xdje42 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00002.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17785 Doug Evans changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xdje42 at gmail dot com --- Comment #1 from Doug Evans --- Repro instructions please. Looking at the code (linux_nat_create_inferior) I see it doesn't protect itself from an error thrown by to_create_inferior. Maybe to_create_inferior can't throw an error (in which case no protection is needed) but that'd be a bit fragile. OTOH, even if personality didn't get restored, the next time through should turn on ADDR_NO_RANDOMIZE if disable_randomization is set. Thus it's hard reason about this bug without reproduction instructions. Got repro? I tried the following, and could not reproduce the problem: bash$ gdb hello.x64 ... (gdb) set confirm off (gdb) show disable Disabling randomization of debuggee's virtual address space is on. (gdb) start Temporary breakpoint 1 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 1, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $1 = (void *) 0x7fffffffe1c0 (gdb) start Temporary breakpoint 2 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 2, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $2 = (void *) 0x7fffffffe1c0 (gdb) set disable off (gdb) start Temporary breakpoint 3 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 3, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $3 = (void *) 0x7fffe7de8020 (gdb) start Temporary breakpoint 4 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 4, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $4 = (void *) 0x7fff2fbd7fe0 (gdb) set disable on (gdb) start Temporary breakpoint 5 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 5, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $5 = (void *) 0x7fffffffe1c0 (gdb) start Temporary breakpoint 6 at 0x400764: file hello.cc, line 6. Starting program: /home/dje/hello.x64 Temporary breakpoint 6, main () at hello.cc:6 6 std::cout << "hello\n"; (gdb) p $rsp $6 = (void *) 0x7fffffffe1c0 (gdb) -- You are receiving this mail because: You are on the CC list for the bug.