public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once
@ 2015-01-03 15:34 dman79 at gmail dot com
2015-01-03 18:14 ` [Bug gdb/17785] " xdje42 at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dman79 at gmail dot com @ 2015-01-03 15:34 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17785
Bug ID: 17785
Summary: GDB ignores "disable-randomization" setting once its
set to off once
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: dman79 at gmail dot com
I've recreated this in a few times installed xubuntu then linuxlite.. once you
set disable-randomization to off it will from now on ignore the setting
you can set it to on and it will show on but memory/stack will be randomized
from now on.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/17785] GDB ignores "disable-randomization" setting once its set to off once
2015-01-03 15:34 [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once dman79 at gmail dot com
@ 2015-01-03 18:14 ` xdje42 at gmail dot com
2015-01-05 7:22 ` dman79 at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: xdje42 at gmail dot com @ 2015-01-03 18:14 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17785
Doug Evans <xdje42 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xdje42 at gmail dot com
--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/17785] GDB ignores "disable-randomization" setting once its set to off once
2015-01-03 15:34 [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once dman79 at gmail dot com
2015-01-03 18:14 ` [Bug gdb/17785] " xdje42 at gmail dot com
@ 2015-01-05 7:22 ` dman79 at gmail dot com
2015-01-05 17:13 ` xdje42 at gmail dot com
2022-03-06 17:49 ` tromey at sourceware dot org
3 siblings, 0 replies; 5+ messages in thread
From: dman79 at gmail dot com @ 2015-01-05 7:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17785
--- Comment #2 from dman79 at gmail dot com ---
Reproducing the problem is simple gdb myprogram
show disable-randomization
set disable-randomization on
quit
gdb myprogram
b *main
r
x/x $esp
r
x/x $esp
show disable-randomization
which will be on but $esp will be randomized on each single run.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/17785] GDB ignores "disable-randomization" setting once its set to off once
2015-01-03 15:34 [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once dman79 at gmail dot com
2015-01-03 18:14 ` [Bug gdb/17785] " xdje42 at gmail dot com
2015-01-05 7:22 ` dman79 at gmail dot com
@ 2015-01-05 17:13 ` xdje42 at gmail dot com
2022-03-06 17:49 ` tromey at sourceware dot org
3 siblings, 0 replies; 5+ messages in thread
From: xdje42 at gmail dot com @ 2015-01-05 17:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17785
--- Comment #3 from Doug Evans <xdje42 at gmail dot com> ---
(In reply to dman79 from comment #2)
> Reproducing the problem is simple gdb myprogram
> show disable-randomization
> set disable-randomization on
> quit
>
> gdb myprogram
> b *main
> r
> x/x $esp
> r
> x/x $esp
> show disable-randomization
>
> which will be on but $esp will be randomized on each single run.
Did you mean "set disable-randomization" off in the above example?
Plus, are you saying that enabling randomization *** in a separate ***
gdb session then enabled randomization for all subsequent gdb sessions?
If so, that's a kernel bug.
I still can't reproduce the problem.
Let's first pin down your repro.
Can you paste an unedited session log, starting from the shell command that
launches gdb?
And, on the off chance (seems unlikely, but who knows), what's your kernel
version?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/17785] GDB ignores "disable-randomization" setting once its set to off once
2015-01-03 15:34 [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once dman79 at gmail dot com
` (2 preceding siblings ...)
2015-01-05 17:13 ` xdje42 at gmail dot com
@ 2022-03-06 17:49 ` tromey at sourceware dot org
3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2022-03-06 17:49 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17785
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
CC| |tromey at sourceware dot org
Status|NEW |RESOLVED
--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Years without a response, I suspect this isn't a bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-06 17:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-03 15:34 [Bug gdb/17785] New: GDB ignores "disable-randomization" setting once its set to off once dman79 at gmail dot com
2015-01-03 18:14 ` [Bug gdb/17785] " xdje42 at gmail dot com
2015-01-05 7:22 ` dman79 at gmail dot com
2015-01-05 17:13 ` xdje42 at gmail dot com
2022-03-06 17:49 ` tromey at sourceware dot org
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).