This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/10884] New: division by zero in value.c:1892


I keep getting a division by zero with the following backtrace:


Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb7ab68d0 (LWP 3375)]
0x08130839 in value_primitive_field (arg1=0xa812a18, offset=0, fieldno=4, 
    arg_type=0x90007c0) at value.c:1892
1892          if ((bitpos % container_bitsize) + v->bitsize <= container_bitsize


#0  0x08130839 in value_primitive_field (arg1=0xa812a18, offset=0, fieldno=4, 
    arg_type=0x90007c0) at value.c:1892
        bitpos = 128
        container_bitsize = 0
        v = (struct value *) 0xaa554b0
        type = (struct type *) 0x9000844
#1  0x081ddf41 in value_struct_element_index (value=0xa812a18, type_index=4)
    at varobj.c:2747
        result = (struct value *) 0x0
        e = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        type = (struct type *) 0x90007c0
        __PRETTY_FUNCTION__ = "value_struct_element_index"
#2  0x081de6c0 in cplus_describe_child (parent=<value optimized out>, index=-1, 
    cname=0x0, cvalue=0xbfd5eae4, ctype=0x0, cfull_expression=0x0) at varobj.c:3222
        type_index = 4
        acc = <value optimized out>andre.poenitz@nokia.com
        join = 0x82fea65 "."
        value = (struct value *) 0xa812a18
        type = (struct type *) 0x90007c0
        was_ptr = 0
        parent_expression = 0x0
        __PRETTY_FUNCTION__ = "cplus_describe_child"
#3  0x081de7d0 in cplus_value_of_child (parent=0xaa553c0, index=4) at varobj.c:3344
        value = (struct value *) 0x0
#4  0x081e1b50 in varobj_list_children (var=0xaa553c0, from=0xbfd5eb58, 
    to=0xbfd5eb54) at varobj.c:2429
        existing = <value optimized out>
        name = 0xaa55600 "sharable"
        i = 4
        children_changed = 2300
#5  0x080f2dab in mi_cmd_var_list_children (command=0xab318d8 "var-list-children", 
    argv=0xab3bc38, argc=2) at ./mi/mi-cmd-var.c:423
        var = (struct varobj *) 0xaa553c0
        children = <value optimized out>
        child = <value optimized out>
        print_values = <value optimized out>
        ix = <value optimized out>
        from = -1
        to = -1
        display_hint = <value optimized out>
#6  0x080f6523 in captured_mi_execute_command (uiout=0x8b6ab40, data=0x9f55918)
    at ./mi/mi-main.c:1388
        cleanup = (struct cleanup *) 0x0
#7  0x081713ca in catch_exception (uiout=0x8b6ab40, 
    func=0x80f63e0 <captured_mi_execute_command>, func_args=0x9f55918, mask=6)
    at exceptions.c:462
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#8  0x080f608b in mi_execute_command (
    cmd=0xab31b78 "116-var-list-children --all-values \"local.list.@.d.*.public\"", 
    from_tty=1) at ./mi/mi-main.c:1288
        result = {reason = 80, error = 179510136, sage = 0xbfd5ec38
"X&#65533;&#65533;\004i\027\bx\033&#65533;\n"}
        previous_ptid = {pid = 3377, lwp = 3377, tid = 0}
        command = (struct mi_parse *) 0x9f55918
#9  0x080f5006 in mi_execute_command_wrapper (
    cmd=0xab31b78 "116-var-list-children --all-values \"local.list.@.d.*.public\"")
    at ./mi/mi-interp.c:251
No locals.
#10 0x08176904 in handle_file_event (data={ptr = 0x0, integer = 0})
    at event-loop.c:812
        file_ptr = (file_handler *) 0x8bd5c00
        mask = <value optimized out>
        error_mask_returned = 0
#11 0x081760cb in process_event () at event-loop.c:394
        event_ptr = <value optimized out>
        proc = (event_handler_func *) 0x8176880 <handle_file_event>
        data = {ptr = 0x0, integer = 0}
#12 0x08176fe4 in gdb_do_one_event (data=0x0) at event-loop.c:459
        current = 3
        event_source_head = 0
#13 0x0817119b in catch_errors (func=0x8176d90 <gdb_do_one_event>, func_args=0x0, 
    errstring=0x82dc69d "", mask=6) at exceptions.c:510
        val = 0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#14 0x0817683c in start_event_loop () at event-loop.c:483
        gdb_result = 128
#15 0x0808e97b in captured_command_loop (data=0x0) at ./main.c:226
No locals.
#16 0x0817119b in catch_errors (func=0x808e970 <captured_command_loop>, 
    func_args=0x0, errstring=0x82dc69d "", mask=6) at exceptions.c:510
        val = 0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#17 0x0808f5ec in captured_main (data=0xbfd5ee24) at ./main.c:902
        argc = 4
        ...
#18 0x0817119b in catch_errors (func=0x808eaf0 <captured_main>, 
    func_args=0xbfd5ee24, errstring=0x82dc69d "", mask=6) at exceptions.c:510
        val = 0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#19 0x0808e8b1 in gdb_main (args=0xbfd5ee24) at ./main.c:911
No locals.
#20 0x0808e875 in main (argc=Cannot access memory at address 0x1
) at gdb.c:33
        args = {argc = 4, argv = 0xbfd5eed4, use_windows = 0, 
  interpreter_p = 0x82cc8c8 "console"}



(gdb) p container_bitsize
$1 = 0

-- 
           Summary: division by zero in value.c:1892
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: andre dot poenitz at nokia dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10884

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]