[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073 Jakub Jelinek changed: What|Removed |Added Target Milestone|4.4.6 |4.4.7
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073 Jakub Jelinek changed: What|Removed |Added Target Milestone|4.4.5 |4.4.6
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
-- jakub at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|4.4.4 |4.4.5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #7 from ludovic at ludovic-brenta dot org 2009-11-19 18:50 --- Created an attachment (id=19060) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19060&action=view) Disassembly of prj-part.adb, with sources (objdump -S) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #6 from ludovic at ludovic-brenta dot org 2009-11-18 22:09 --- With a stock GCC 4.4.2 bootstrapped with the default options (-g -O2, I think) on alpha the symptoms are the same. Here is a backtrace: (gdb) run -vP2 -Pp Starting program: /home/lbrenta/gcc-obj/gcc/gnatmake -vP2 -Pp GPR_PROJECT_PATH=".:/home/lbrenta/gcc/lib/gcc/alphaev68-unknown-linux-gnu/4.4.2/../../../gnat" Project_Path_Name_Of ("p", "/home/lbrenta/"); Trying /home/lbrenta//p.gpr Project_Name_From ("/home/lbrenta/p.gpr") ^C Program received signal SIGINT, Interrupt. 0x0001200f8ed8 in prj.part.parse_single_project (in_tree=0x1205fc3e0, path_name=, extended=, from_extended=, in_limited=false, packages_to_check=..., depth=0, current_dir=...) at /home/lbrenta/gcc-4.4.2/gcc/ada/prj-part.adb:1104 1104 Tree_Private_Part.Projects_Htable.Get_Next (In_Tree.Projects_HT); (gdb) bt #0 0x0001200f8ed8 in prj.part.parse_single_project (in_tree=0x1205fc3e0, path_name=, extended=, from_extended=, in_limited=false, packages_to_check=..., depth=0, current_dir=...) at /home/lbrenta/gcc-4.4.2/gcc/ada/prj-part.adb:1104 #1 0x0001200fb020 in prj.part.parse (in_tree=0x1205fc3e0, project_file_name=, always_errout_finalize=, packages_to_check=, store_comments=false, current_directory=...) at /home/lbrenta/gcc-4.4.2/gcc/ada/prj-part.adb:525 #2 0x0001200f4878 in prj.pars.parse (in_tree=, project_file_name=..., packages_to_check=..., when_no_sources=, reset_tree=true) at /home/lbrenta/gcc-4.4.2/gcc/ada/prj-pars.adb:63 #3 0x0001200858f8 in make.initialize () at /home/lbrenta/gcc-4.4.2/gcc/ada/make.adb:6993 #4 0x0001200866cc in make.gnatmake () at /home/lbrenta/gcc-4.4.2/gcc/ada/make.adb:4708 #5 0x000120067708 in gnatmake () at /home/lbrenta/gcc-4.4.2/gcc/ada/gnatmake.adb:38 (gdb) p In_Tree.Projects_HT $4 = (access prj.tree.tree_private_part.projects_htable.tab.instance_data) 0x0 The infinite loop appears to be the loop starting at prj-pars.adb:1048 (frame #0 in the above backtrace). I'll attach a disassembly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #5 from charlet at adacore dot com 2009-11-17 21:45 --- Subject: Re: [4.4 regression] Infinite loop when parsing a project file, alpha only > #1 0x02853dd8 in ?? () from /usr/lib/libgnatprj.so.4.4 > #2 0x02856abc in prj__part__parse () from /usr/lib/libgnatprj.so.4.4 > #3 0x0284df7c in prj__pars__parse () from /usr/lib/libgnatprj.so.4.4 Well, there's no such thing as libgnatprj.so in GCC sources/Makefiles. Can you please retry with a stock GCC and build with -O0 -g to get a more complete info/debug session? TIA. Arno -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
Re: [Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
> #1 0x02853dd8 in ?? () from /usr/lib/libgnatprj.so.4.4 > #2 0x02856abc in prj__part__parse () from /usr/lib/libgnatprj.so.4.4 > #3 0x0284df7c in prj__pars__parse () from /usr/lib/libgnatprj.so.4.4 Well, there's no such thing as libgnatprj.so in GCC sources/Makefiles. Can you please retry with a stock GCC and build with -O0 -g to get a more complete info/debug session? TIA. Arno
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #4 from ludovic at ludovic-brenta dot org 2009-11-17 19:59 --- Actually the disassembly above was that of Tab.Get_Next. The source for Tab.Get_Next is: function Get_Next (T : Instance) return Elmt_Ptr is begin if T = null or else not T.Iterator_Started then return Null_Ptr; end if; T.Iterator_Ptr := Next (T.Iterator_Ptr); return Get_Non_Null (T); end Get_Next; The disassembly of Simple_HTable.Get_Next is: (gdb) up #1 0x0286f344 in prj__tree__tree_private_part__projects_htable__get_next () from /usr/lib/libgnatprj.so.4.4 (gdb) disassemble Dump of assembler code for function prj__tree__tree_private_part__projects_htable__get_next: 0x0286f320 : ldahgp,6(t12) 0x0286f324 : lda gp,-12160(gp) 0x0286f328 : lda sp,-16(sp) 0x0286f32c :ldq t12,-27200(gp) 0x0286f330 :stq s0,8(sp) 0x0286f334 :mov a0,s0 0x0286f338 :stq ra,0(sp) 0x0286f33c :mov a1,a0 0x0286f340 :jsr ra,(t12),0x286f344 0x0286f344 :ldah gp,6(ra) 0x0286f348 :lda gp,-12196(gp) 0x0286f34c :beq v0,0x286f390 0x0286f350 :ldl t0,16(v0) 0x0286f354 :ldl t3,4(v0) 0x0286f358 :ldl t2,8(v0) 0x0286f35c :ldl t1,12(v0) 0x0286f360 :stl t3,0(s0) 0x0286f364 :stl t2,4(s0) 0x0286f368 :stl t1,8(s0) 0x0286f36c :stl t0,12(s0) 0x0286f370 :mov s0,v0 0x0286f374 :ldq ra,0(sp) 0x0286f378 :ldq s0,8(sp) 0x0286f37c :lda sp,16(sp) 0x0286f380 :ret 0x0286f384 : unop 0x0286f388 : nop 0x0286f38c : unop 0x0286f390 : ldah t1,-4(gp) 0x0286f394 : lda t0,20296(t1) 0x0286f398 : ldl t3,20296(t1) 0x0286f39c : ldl t2,4(t0) 0x0286f3a0 : ldl t1,12(t0) 0x0286f3a4 : ldl t0,8(t0) 0x0286f3a8 : stl t3,0(s0) 0x0286f3ac : stl t2,4(s0) 0x0286f3b0 : stl t0,8(s0) 0x0286f3b4 : stl t1,12(s0) 0x0286f3b8 : mov s0,v0 0x0286f3bc : ldq ra,0(sp) 0x0286f3c0 : ldq s0,8(sp) 0x0286f3c4 : lda sp,16(sp) 0x0286f3c8 : ret End of assembler dump. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #3 from ludovic at ludovic-brenta dot org 2009-11-17 19:56 --- Even an empty project file triggers the bug: $ cat > p.gpr <, argc=, ubp_av=, init=0x1200ad190, fini=, rtld_fini=, stack_end=0x11fcbd730) at libc-start.c:222 #9 0x00012000b958 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) Note: this gnatmake is built with -O2 and without -g. (gdb) disassemble Dump of assembler code for function prj__tree__tree_private_part__projects_htable__tab__get_next: 0x0286f290 :ldah gp,6(t12) 0x0286f294 :lda gp,-12016(gp) 0x0286f298 :lda sp,-32(sp) 0x0286f29c : stq s0,8(sp) 0x0286f2a0 : mov a0,s0 0x0286f2a4 : stq ra,0(sp) 0x0286f2a8 : stq s1,16(sp) 0x0286f2ac : bne a0,0x286f2d0 0x0286f2b0 : clr v0 0x0286f2b4 : ldq ra,0(sp) 0x0286f2b8 : ldq s0,8(sp) 0x0286f2bc : ldq s1,16(sp) 0x0286f2c0 : lda sp,32(sp) 0x0286f2c4 : ret 0x0286f2c8 : nop 0x0286f2cc : unop 0x0286f2d0 : ldah s1,1(a0) 0x0286f2d4 : ldl t0,-16312(s1) 0x0286f2d8 : and t0,0xff,t0 0x0286f2dc : beq t0,0x286f2b0 0x0286f2e0 : ldq a0,-16320(s1) 0x0286f2e4 : ldq t12,-32248(gp) 0x0286f2e8 : jsr ra,(t12),0x286f2ec 0x0286f2ec : ldah gp,6(ra) 0x0286f2f0 : mov s0,a0 0x0286f2f4 : lda gp,-12108(gp) 0x0286f2f8 : stq v0,-16320(s1) 0x0286f2fc : ldq t12,-28536(gp) 0x0286f300 : jsr ra,(t12),0x286f304 0x0286f304 : ldah gp,6(ra) 0x0286f308 : lda gp,-12132(gp) 0x0286f30c : ldq ra,0(sp) 0x0286f310 : ldq s0,8(sp) 0x0286f314 : ldq s1,16(sp) 0x0286f318 : lda sp,32(sp) 0x0286f31c : ret End of assembler dump. The sources corresponding to this procedure is: function Get_Next (T : Instance) return Element is Tmp : constant Elmt_Ptr := Tab.Get_Next (Tab.Instance (T)); begin if Tmp = null then return No_Element; else return Tmp.E; end if; end Get_Next; Is this sufficient for debugging? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #2 from ubizjak at gmail dot com 2009-11-17 17:47 --- (In reply to comment #0) > I have access to an alpha-linux-gnu machine, please tell me if I can help > narrow this problem down. A debug trace from gdb would be a nice starting point. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073
[Bug ada/42073] [4.4 regression] Infinite loop when parsing a project file, alpha only
--- Comment #1 from ludovic at ludovic-brenta dot org 2009-11-17 10:27 --- The following project file is known to work on alpha-gnu-linux with GCC 4.3.4: project Build_XMLAda is for Source_Dirs use ("dom", "input_sources", "sax", "schema", "unicode"); for Library_Name use "xmlada"; for Library_Dir use "."; for Library_Kind use External ("kind"); for Library_Version use External ("soname"); for Object_Dir use External ("obj"); for Library_ALI_Dir use "ali-" & External ("obj"); package Compiler is for Default_Switches ("Ada") use ("-g", "-O2", "-gnatafno", "-gnatVa", "-gnatwa"); end Compiler; end Build_XMLAda; Since this project file is not noticeably different from GNADE_Common_Build, I think the bug is actually a regression in 4.4. -- ludovic at ludovic-brenta dot org changed: What|Removed |Added Known to fail||4.4.2 Known to work||4.3.4 Summary|Infinite loop when parsing a|[4.4 regression] Infinite |project file, alpha only|loop when parsing a project ||file, alpha only http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42073