From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24998 invoked by alias); 20 Feb 2015 03:18:36 -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 24970 invoked by uid 48); 20 Feb 2015 03:18:34 -0000 From: "tom.k.cook at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug fortran/17989] gdb hangs on some Fortran stack frames Date: Fri, 20 Feb 2015 12:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: fortran X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tom.k.cook 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: 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/msg00277.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17989 --- Comment #2 from Tom Cook --- Here is a reproducible case, probably related to this bug. Put the following in test.f90: program test implicit none integer :: aviFail type TestData INTEGER :: i INTEGER, ALLOCATABLE :: j(:) INTEGER :: k INTEGER, ALLOCATABLE :: l(:) end type TestData type(TestData), allocatable :: s(:) allocate(s(1), STAT = aviFail) allocate(s(1)%j(2), STAT = aviFail) allocate(s(1)%l(4), STAT = aviFail) s(1)%k = 0 if(s(1)%k.EQ.0) write(*, '(A)') "Hello, world." end program test Build it like this: gfortran -o test.o -c -g -cpp -ffixed-line-length-none -ffree-line-length-none -fcoarray=single -fno-underscoring -fPIC test.f90 gfortran -o test -g test.o Load the resulting executable in gdb. Execute the 'start' command, followed by the 'next' command four times to step through to test.f90:18. Execute 'print s' to show the content of the structure 's'; gdb crashes. The stack trace from the resulting core is pasted in below: #0 __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:36 #1 0x000000000055ecf1 in value_from_decfloat (type=type@entry=0x2d96180, dec=dec@entry=0x2d1fb00 "\377\377\377\377\377\377\377\377\t\001") at ../../gdb/value.c:3545 #2 0x000000000055ed56 in value_from_contents_and_address (type=type@entry=0x2c6d0e0, valaddr=valaddr@entry=0x2d1fb00 "\377\377\377\377\377\377\377\377\t\001", address=address@entry=6315920) at ../../gdb/value.c:3501 #3 0x00000000005062e7 in gdbpy_apply_val_pretty_printer (extlang=, type=0x2c6d0e0, valaddr=0x2d1fb00 "\377\377\377\377\377\377\377\377\t\001", embedded_offset=, address=, stream=0x2c116a0, recurse=1, val=0x2d41540, options=0x7ffff7d9d0d0, language=0x829040 ) at ../../gdb/python/py-prettyprint.c:716 #4 0x00000000005b039e in apply_ext_lang_val_pretty_printer (type=type@entry=0x2c6d0e0, valaddr=valaddr@entry=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=embedded_offset@entry=16, address=address@entry=6315904, stream=stream@entry=0x2c116a0, recurse=recurse@entry=1, val=0x2d41540, options=0x7ffff7d9d0d0, language=0x829040 ) at ../../gdb/extension.c:514 #5 0x000000000057152c in val_print (type=0x2c6d0e0, valaddr=valaddr@entry=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=16, address=address@entry=6315904, stream=stream@entry=0x2c116a0, recurse=recurse@entry=1, val=0x2d41540, options=0x7ffff7d9d0d0, language=0x829040 ) at ../../gdb/valprint.c:770 #6 0x0000000000670b68 in f_val_print (type=0x2c6c390, valaddr=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=8, address=6315904, stream=0x2c116a0, recurse=0, original_value=0x2d41540, options=0x7ffff7d9d0d0) at ../../gdb/f-valprint.c:380 #7 0x00000000005714b9 in val_print (type=0x2c6c390, valaddr=valaddr@entry=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=8, address=address@entry=6315904, stream=stream@entry=0x2c116a0, recurse=recurse@entry=0, val=0x2d41540, options=0x7ffff7d9d300, language=0x829040 ) at ../../gdb/valprint.c:787 #8 0x000000000067074f in f77_print_array_1 (nss=nss@entry=1, ndimensions=ndimensions@entry=1, valaddr=valaddr@entry=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=embedded_offset@entry=0, address=address@entry=6315904, stream=0x2c116a0, recurse=0, val=0x2d41540, options=0x7ffff7d9d300, elts=0x7ffff7d9d220, type=0x2d92ed0) at ../../gdb/f-valprint.c:191 #9 0x0000000000670ad6 in f77_print_array (options=0x7ffff7d9d300, val=0x2d41540, recurse=0, stream=0x2c116a0, address=6315904, embedded_offset=0, valaddr=0x2d1faf0 "@\300\374\367\377\177", type=0x2d92ed0) at ../../gdb/f-valprint.c:234 #10 f_val_print (type=0x2d92ed0, valaddr=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=0, address=6315904, stream=0x2c116a0, recurse=0, original_value=0x2d41540, options=0x7ffff7d9d300) at ../../gdb/f-valprint.c:281 #11 0x00000000005714b9 in val_print (type=type@entry=0x2d92ed0, valaddr=0x2d1faf0 "@\300\374\367\377\177", embedded_offset=embedded_offset@entry=0, address=address@entry=6315904, stream=stream@entry=0x2c116a0, recurse=recurse@entry=0, val=0x2d41540, options=0x7ffff7d9d3a0, language=0x829040 ) at ../../gdb/valprint.c:787 #12 0x000000000066e38c in c_value_print (val=0x2d41540, stream=0x2c116a0, options=) at ../../gdb/c-valprint.c:584 #13 0x00000000005771d9 in print_command_1 (exp=0x2a7a192 "s", voidprint=) at ../../gdb/printcmd.c:994 #14 0x000000000067ab76 in execute_command (p=, p@entry=0x2a7a190 "p s", from_tty=1) at ../../gdb/top.c:476 #15 0x00000000005b9505 in command_handler (command=0x2a7a190 "p s") at ../../gdb/event-top.c:494 #16 0x00000000005b9c07 in command_line_handler (rl=) at ../../gdb/event-top.c:692 #17 0x00000000006ca893 in rl_callback_read_char () at ../../readline/callback.c:220 #18 0x00000000005b9569 in rl_callback_read_char_wrapper (client_data=) at ../../gdb/event-top.c:171 #19 0x00000000005b95b3 in stdin_event_handler (error=, client_data=0x0) #20 0x00000000005b84e2 in gdb_wait_for_event (block=block@entry=1) at ../../gdb/event-loop.c:772 #21 0x00000000005b8699 in gdb_do_one_event () at ../../gdb/event-loop.c:309 #22 0x00000000005b87de in start_event_loop () at ../../gdb/event-loop.c:334 #23 0x00000000005b26b3 in captured_command_loop (data=data@entry=0x0) at ../../gdb/main.c:321 #24 0x00000000005afc35 in catch_errors (func=func@entry=0x5b26a0 , func_args=func_args@entry=0x0, errstring=errstring@entry=0x7948d2 "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237 #25 0x00000000005b3196 in captured_main (data=data@entry=0x7ffff7d9d820) at ../../gdb/main.c:1149 #26 0x00000000005afc35 in catch_errors (func=func@entry=0x5b2b00 , func_args=func_args@entry=0x7ffff7d9d820, errstring=errstring@entry=0x7948d2 "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237 #27 0x00000000005b3a8b in gdb_main (args=args@entry=0x7ffff7d9d820) at ../../gdb/main.c:1157 #28 0x000000000045f205 in main (argc=, argv=) at ../../gdb/gdb.c:32 -- You are receiving this mail because: You are on the CC list for the bug.