public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bam@snoopy.apana.org.au To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: ada/6910: reproducible segmentation fault Date: Sun, 02 Jun 2002 17:06:00 -0000 [thread overview] Message-ID: <20020603000026.38DD4CC13@scrooge.chocbit.org.au> (raw) >Number: 6910 >Category: ada >Synopsis: When I run this code it segfaults. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Sun Jun 02 17:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: bam@snoopy.apana.org.au >Release: 3.1 (Debian) (Debian unstable) >Organization: The Debian Project >Environment: System: Debian GNU/Linux (unstable) Architecture: i686 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii gcc-3.1 3.1-2 The GNU C compiler. ii g++-3.1 3.1-2 The GNU C++ compiler. ii libstdc++4 3.1-2 The GNU stdc++ library version 3 ii libstdc++4-dev 3.1-2 The GNU stdc++ library version 3 (developmen ii binutils 2.12.90.0.7-1 The GNU assembler, linker and binary utiliti ii libc6 2.2.5-6 GNU C Library: Shared libraries and Timezone host: i386-linux configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux >Description: [ Reported to the Debian BTS as report #147145. Please CC 147145@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/147145 ] When I run this code which combines the usage of GNAT.Dynamic_Tables and XmlAda in the one program, the program segfaults for some unknown reason. This occurs with the prior gcc-3.0 version of Gnat, too. (I apologize in advance if this problem is my fault, but I can't see any indication that is the case). --- CUT --- [532] [scrooge:bam] ~/tmp/ada/testbug >~/tmp/gnat-gdb-5/gdb/gdb ./testbug3 GNU gdb 5.0.gnat.3.15w-41 Copyright 2000 Free Software Foundation, Inc. Ada Core Technologies version of GDB for GNAT Professional GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. See your support agreement for details of warranty and support. If you do not have a current support agreement, then there is absolutely no warranty for this version of GDB. Type show warranty for details. This GDB was configured as "i686-pc-linux"... (gdb) r Starting program: /home/bam/tmp/ada/testbug/./testbug3 Program received signal SIGSEGV, Segmentation fault. 0x80afd9f in system__finalization_implementation__finalize_list () (gdb) bt #0 0x80afd9f in system__finalization_implementation__finalize_list () #1 0x80584a3 in <testbug3___deep_finalize.4> (v=@0x80c9f08, b=false) at testbug3.adb:41 #2 0x8058efb in testbug3 () at testbug3.adb:77 #3 0x8049f2e in main (argc=1, argv=3221223924, envp=<incomplete type>) at b~testbug3.adb:277 #4 0x4003a14f in __libc_start_main () from /lib/libc.so.6 --- CUT --- >How-To-Repeat: Run this code: --- CUT --- with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Input_Sources.File; use Input_Sources.File; with Tree_Readers; use Tree_Readers; with Sax.Readers; use Sax.Readers; with DOM.Core; use DOM.Core; with DOM.Core.Nodes; use DOM.Core.Nodes; with DOM.Core.Documents; use DOM.Core.Documents; with DOM.Core.Elements; use DOM.Core.Elements; with GNAT.Dynamic_Tables; procedure TestBug3 is Read : File_Input; My_Tree_Reader : Tree_Reader; My_Tree : Document; My_Root : DOM.Core.Element; My_Nodes : Node_List; type Arm is delta 0.1 range 1_000.0 .. 5_000.0; type Litres is range 0..200; type Fuel_Tank is record Description : Unbounded_String; The_Arm : Arm; Maximum : Litres; end record; package Fuel_Tank_Tables is new GNAT.Dynamic_Tables(Table_Component_Type=>Fuel_Tank, Table_Index_Type=>Positive, Table_Low_Bound=>1, Table_Initial=>5, Table_Increment=>50); use Fuel_Tank_Tables; T : Fuel_Tank_Tables.Instance; begin Set_Public_Id (Read, "aircrafts.xml"); Set_System_Id (Read, "aircrafts.xml"); Open ("aircrafts.xml", Read); -- Set_Feature (My_Tree_Reader, Validation_Feature, True); -- Parse (My_Tree_Reader, Read); Close (Read); -- Normalize(Get_Tree(My_Tree_Reader)); -- My_Tree := Get_Tree(My_Tree_Reader); -- My_Root := Get_Element(My_Tree); -- My_Nodes := DOM.Core.Elements.Get_Elements_By_Tag_Name(My_Root); Init(T); Set_Last(T,1); T.Table(1) := ( Description => To_Unbounded_String("Fuel Tank"), The_Arm => 2413.0, Maximum => 181 ); end TestBug3; --- CUT --- For reference, I compiler it with: #!/bin/sh -ex XMLADA=$HOME/tmp/xmlada-0.7.1 #gnatmake -g testbug3 -I$XMLADA/unicode -I$XMLADA/input_sources/ -I$XMLADA/dom -I$XMLADA/sax gnatmake -gstabs+ testbug3 -I$XMLADA/unicode -I$XMLADA/input_sources/ -I$XMLADA/dom -I$XMLADA/sax >Fix: Comment out the call to Close, Get_Element, and Get_Elements_By_Tag_Name. >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2002-06-03 0:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020603000026.38DD4CC13@scrooge.chocbit.org.au \ --to=bam@snoopy.apana.org.au \ --cc=147145@bugs.debian.org \ --cc=debian-gcc@lists.debian.org \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).