From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13630 invoked by alias); 16 Apr 2015 08:18:21 -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 13596 invoked by uid 48); 16 Apr 2015 08:18:21 -0000 From: "stewart.martin-haugh at cern dot ch" To: gdb-prs@sourceware.org Subject: [Bug cli/18268] New: Undefined behaviour in gdb initialisation Date: Thu, 16 Apr 2015 08:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stewart.martin-haugh at cern dot ch 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-q2/txt/msg00056.txt.bz2 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 , 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 , 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.