public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/18268] New: Undefined behaviour in gdb initialisation
@ 2015-04-16  8:18 stewart.martin-haugh at cern dot ch
  2020-06-07 16:47 ` [Bug cli/18268] " tromey at sourceware dot org
  0 siblings, 1 reply; 2+ messages in thread
From: stewart.martin-haugh at cern dot ch @ 2015-04-16  8:18 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18268
           Summary: Undefined behaviour in gdb initialisation
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: stewart.martin-haugh at cern dot ch

Hi,
While initialising gdb compiled under gcc 4.9.1 with -fsanitize=undefined, I
found these three runtime errors:

terminal.c:336:39: runtime error: signed integer overflow: 158 * 2147483647
cannot be represented in type 'int'
with backtrace:
#0  0x0000000000464300 in __ubsan_handle_mul_overflow@plt ()
#1  0x0000000000e47100 in _rl_set_screen_size (rows=0x7fffffff, cols=0x9e) at
terminal.c:336
#2  0x0000000000e4712f in rl_set_screen_size (rows=0x7fffffff, cols=0x9e) at
terminal.c:343
#3  0x0000000000d0c2bd in set_screen_size () at utils.c:1763
#4  0x0000000000d0c3c2 in set_height_command (args=0x0, from_tty=0x0,
c=0x611000007840) at utils.c:1795
#5  0x00000000005ea342 in do_sfunc (c=0x611000007840, args=0x0, from_tty=0x0)
at ./cli/cli-decode.c:121
#6  0x000000000060bdcb in do_set_command (arg=0x6070000a959b "0", from_tty=0x0,
c=0x611000007840) at ./cli/cli-setshow.c:455
#7  0x0000000000d021af in execute_command (p=0x6070000a959b "0", from_tty=0x0)
at top.c:468
#8  0x0000000000d02816 in command_loop () at top.c:573
#9  0x0000000000d01741 in read_command_file (stream=0x616000457e80) at
top.c:300
#10 0x00000000005ffd3e in script_from_file (stream=0x616000457e80,
file=0x604000226b50 "/afs/cern.ch/user/s/smh/.gdbinit") at
./cli/cli-script.c:1707
#11 0x0000000000602132 in source_script_from_stream (stream=0x616000457e80,
file=0x604000226b50 "/afs/cern.ch/user/s/smh/.gdbinit") at ./cli/cli-cmds.c:549
#12 0x0000000000602310 in source_script_with_search (file=0x604000226b50
"/afs/cern.ch/user/s/smh/.gdbinit", from_tty=0x0, search_path=0x0)
    at ./cli/cli-cmds.c:589
#13 0x00000000006023af in source_script (file=0x604000226b50
"/home/username/.gdbinit", from_tty=0x0) at ./cli/cli-cmds.c:599
#14 0x0000000000948378 in catch_command_errors_const (command=0x60238a
<source_script>, arg=0x604000226b50 "/home/username/.gdbinit", from_tty=0x0, 
    mask=RETURN_MASK_ALL) at main.c:396
#15 0x000000000094a930 in captured_main (data=0x7fffffff62b0) at main.c:1000
#16 0x000000000093b73a in catch_errors (func=0x948b90 <captured_main>,
func_args=0x7fffffff62b0, errstring=0x1449500 "", mask=RETURN_MASK_ALL)
    at exceptions.c:237
#17 0x000000000094b4b5 in gdb_main (args=0x7fffffff62b0) at main.c:1157
#18 0x0000000000465844 in main (argc=0x1, argv=0x7fffffff63f8) at gdb.c:32


cp-demangle.c:4074:40: runtime error: variable length array bound evaluates to
non-positive value 0
cp-demangle.c:4075:43: runtime error: variable length array bound evaluates to
non-positive value 0

This is my first bug report on GDB - please let me know if I should provide
anything else.

Best regards,
Stewart Martin-Haugh

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug cli/18268] Undefined behaviour in gdb initialisation
  2015-04-16  8:18 [Bug cli/18268] New: Undefined behaviour in gdb initialisation stewart.martin-haugh at cern dot ch
@ 2020-06-07 16:47 ` tromey at sourceware dot org
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2020-06-07 16:47 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I believe this was fixed by the readline upgrade.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-07 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16  8:18 [Bug cli/18268] New: Undefined behaviour in gdb initialisation stewart.martin-haugh at cern dot ch
2020-06-07 16:47 ` [Bug cli/18268] " 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).