Bug 34908 - valgrind error indication from testsuite hashtab.c : htab_hash_string
Summary: valgrind error indication from testsuite hashtab.c : htab_hash_string
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-21 22:03 UTC by İsmail Dönmez
Modified: 2008-06-21 21:38 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description İsmail Dönmez 2008-01-21 22:03:13 UTC
FAIL: gfortran.dg/do_3.F90  -O3 -g  (test for excess errors)
Excess errors:
==6073== Invalid read of size 1
==6073==    at 0x870B847: htab_hash_string (hashtab.c:812)
==6073==    by 0x8196A99: lookup_filename (dwarf2out.c:14304)
==6073==    by 0x8191935: add_src_coords_attributes (dwarf2out.c:11359)
==6073==    by 0x81919FE: add_name_and_src_coords_attributes (dwarf2out.c:11376)
==6073==    by 0x81935B4: gen_subprogram_die (dwarf2out.c:12376)
==6073==    by 0x8196109: gen_decl_die (dwarf2out.c:13901)
==6073==    by 0x81968ED: dwarf2out_decl (dwarf2out.c:14218)
==6073==    by 0x81931AE: dwarf2out_abstract_function (dwarf2out.c:12236)
==6073==    by 0x84BAEB8: expand_call_inline (tree-inline.c:2874)
==6073==    by 0x84BAFA2: gimple_expand_calls_inline (tree-inline.c:2910)
==6073==    by 0x84BB2D8: optimize_inline_calls (tree-inline.c:3003)
==6073==    by 0x849E44F: apply_inline (ipa-inline.c:1598)
==6073==  Address 0x424fa38 is 0 bytes inside a block of size 90 free'd
==6073==    at 0x4022F82: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6073==    by 0x80BD16B: preprocessor_line (scanner.c:1412)
==6073==    by 0x80BD585: load_file (scanner.c:1566)
==6073==    by 0x80BD8A5: gfc_new_file (scanner.c:1680)
==6073==    by 0x80D24ED: gfc_init (f95-lang.c:290)
==6073==    by 0x8314354: lang_dependent_init (toplev.c:2128)
==6073==    by 0x8314585: do_compile (toplev.c:2250)
==6073==    by 0x83145F0: toplev_main (toplev.c:2283)
==6073==    by 0x811D011: main (main.c:35)
==6073==·
==6073== Invalid read of size 1
==6073==    at 0x4024CC3: strcmp (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6073==    by 0x870B4E1: htab_find_slot_with_hash (hashtab.c:634)
==6073==    by 0x8196ABA: lookup_filename (dwarf2out.c:14304)
==6073==    by 0x8191935: add_src_coords_attributes (dwarf2out.c:11359)
==6073==    by 0x81919FE: add_name_and_src_coords_attributes (dwarf2out.c:11376)
==6073==    by 0x8192CBD: gen_formal_parameter_die (dwarf2out.c:12063)
==6073==    by 0x81963AA: gen_decl_die (dwarf2out.c:13985)
==6073==    by 0x8193A1E: gen_subprogram_die (dwarf2out.c:12540)
==6073==    by 0x8196109: gen_decl_die (dwarf2out.c:13901)
==6073==    by 0x81968ED: dwarf2out_decl (dwarf2out.c:14218)
==6073==    by 0x81931AE: dwarf2out_abstract_function (dwarf2out.c:12236)
==6073==    by 0x84BAEB8: expand_call_inline (tree-inline.c:2874)
==6073==  Address 0x424fa38 is 0 bytes inside a block of size 90 free'd
==6073==    at 0x4022F82: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6073==    by 0x80BD16B: preprocessor_line (scanner.c:1412)
==6073==    by 0x80BD585: load_file (scanner.c:1566)
==6073==    by 0x80BD8A5: gfc_new_file (scanner.c:1680)
==6073==    by 0x80D24ED: gfc_init (f95-lang.c:290)
==6073==    by 0x8314354: lang_dependent_init (toplev.c:2128)
==6073==    by 0x8314585: do_compile (toplev.c:2250)
==6073==    by 0x83145F0: toplev_main (toplev.c:2283)
==6073==    by 0x811D011: main (main.c:35)

Used svn revision 131650.
Comment 1 Laurynas Biveinis 2008-06-18 16:24:46 UTC
Confirmed with r136520:
(I don't have bugzilla permissions to change status from UNCONFIRMED though)

lauris@lauris-laptop:~/src/gcc-trunk/gcc/gcc/testsuite/gfortran.dg$ valgrind "/home/lauris/src/gcc-trunk/obj/gcc/testsuite/gfortran/../../f951" "/home/lauris/src/gcc-trunk/gcc/gcc/testsuite/gfortran.dg/do_3.F90" "-cpp" "/tmp/ccknYXpY.f90" "-quiet" "-iprefix" "/home/lauris/src/gcc-trunk/obj/gcc/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/" "-isystem" "/home/lauris/src/gcc-trunk/obj/gcc/testsuite/gfortran/../../include" "-isystem" "/home/lauris/src/gcc-trunk/obj/gcc/testsuite/gfortran/../../include-fixed" "/home/lauris/src/gcc-trunk/gcc/gcc/testsuite/gfortran.dg/do_3.F90" "-mtune=generic" "-std=legacy" "-ffree-line-length-none" "-fno-range-check" "-fwrapv" "-fworking-directory" "-O3" "-quiet" "-dumpbase" "do_3.F90" "-mtune=generic" "-auxbase" "do_3" "-g" "-O3" "-std=legacy" "-ffree-line-length-none" "-fno-range-check" "-fwrapv" "-fintrinsic-modules-path" "finclude" "-o" "/tmp/cccjy6GM.s"
==15364== Memcheck, a memory error detector.
==15364== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==15364== Using LibVEX rev 1854, a library for dynamic binary translation.
==15364== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==15364== Using valgrind-3.3.1, a dynamic binary instrumentation framework.
==15364== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==15364== For more details, rerun with: -v
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C20: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x56D4D6: gen_subprogram_die (dwarf2out.c:12483)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==    by 0x95BFFA: optimize_inline_calls (tree-inline.c:3026)
==15364==    by 0x930A36: inline_transform (ipa-inline.c:1627)
==15364==    by 0x68DB8A: execute_one_pass (passes.c:1215)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==  Address 0x56e06b0 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C3F: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x56D4D6: gen_subprogram_die (dwarf2out.c:12483)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==    by 0x95BFFA: optimize_inline_calls (tree-inline.c:3026)
==15364==    by 0x930A36: inline_transform (ipa-inline.c:1627)
==15364==    by 0x68DB8A: execute_one_pass (passes.c:1215)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==  Address 0x56e06b1 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x4C24061: strcmp (mc_replace_strmem.c:337)
==15364==    by 0x555BBB: file_table_eq (dwarf2out.c:14428)
==15364==    by 0xB88508: htab_find_slot_with_hash (hashtab.c:634)
==15364==    by 0x555F83: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x569A40: gen_formal_parameter_die (dwarf2out.c:12170)
==15364==    by 0x56AABF: gen_decl_die (dwarf2out.c:14136)
==15364==    by 0x56C32E: gen_subprogram_die (dwarf2out.c:12647)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==  Address 0x56e06b0 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x4C24064: strcmp (mc_replace_strmem.c:337)
==15364==    by 0x555BBB: file_table_eq (dwarf2out.c:14428)
==15364==    by 0xB88508: htab_find_slot_with_hash (hashtab.c:634)
==15364==    by 0x555F83: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x569A40: gen_formal_parameter_die (dwarf2out.c:12170)
==15364==    by 0x56AABF: gen_decl_die (dwarf2out.c:14136)
==15364==    by 0x56C32E: gen_subprogram_die (dwarf2out.c:12647)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==  Address 0x56e06b0 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x4C24070: strcmp (mc_replace_strmem.c:337)
==15364==    by 0x555BBB: file_table_eq (dwarf2out.c:14428)
==15364==    by 0xB88508: htab_find_slot_with_hash (hashtab.c:634)
==15364==    by 0x555F83: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x569A40: gen_formal_parameter_die (dwarf2out.c:12170)
==15364==    by 0x56AABF: gen_decl_die (dwarf2out.c:14136)
==15364==    by 0x56C32E: gen_subprogram_die (dwarf2out.c:12647)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==  Address 0x56e06b1 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x4C24074: strcmp (mc_replace_strmem.c:337)
==15364==    by 0x555BBB: file_table_eq (dwarf2out.c:14428)
==15364==    by 0xB88508: htab_find_slot_with_hash (hashtab.c:634)
==15364==    by 0x555F83: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x561727: add_src_coords_attributes (dwarf2out.c:11467)
==15364==    by 0x562732: add_name_and_src_coords_attributes (dwarf2out.c:11484)
==15364==    by 0x569A40: gen_formal_parameter_die (dwarf2out.c:12170)
==15364==    by 0x56AABF: gen_decl_die (dwarf2out.c:14136)
==15364==    by 0x56C32E: gen_subprogram_die (dwarf2out.c:12647)
==15364==    by 0x56A98F: gen_decl_die (dwarf2out.c:14042)
==15364==    by 0x568489: dwarf2out_abstract_function (dwarf2out.c:12343)
==15364==    by 0x95AF2B: gimple_expand_calls_inline (tree-inline.c:2891)
==15364==  Address 0x56e06b1 is not stack'd, malloc'd or (recently) free'd
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C20: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x5571EC: dwarf2out_source_line (dwarf2out.c:14580)
==15364==    by 0x5573F0: dwarf2out_begin_prologue (dwarf2out.c:2678)
==15364==    by 0x5B4B4F: final_start_function (final.c:1487)
==15364==    by 0x5B4CB6: rest_of_handle_final (final.c:4095)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C3F: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x5571EC: dwarf2out_source_line (dwarf2out.c:14580)
==15364==    by 0x5573F0: dwarf2out_begin_prologue (dwarf2out.c:2678)
==15364==    by 0x5B4B4F: final_start_function (final.c:1487)
==15364==    by 0x5B4CB6: rest_of_handle_final (final.c:4095)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364==  Address 0x56e06b1 is 1 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x711600: output_quoted_string (toplev.c:652)
==15364==    by 0x557170: maybe_emit_file (dwarf2out.c:14495)
==15364==    by 0x5571F4: dwarf2out_source_line (dwarf2out.c:14580)
==15364==    by 0x5573F0: dwarf2out_begin_prologue (dwarf2out.c:2678)
==15364==    by 0x5B4B4F: final_start_function (final.c:1487)
==15364==    by 0x5B4CB6: rest_of_handle_final (final.c:4095)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C20: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x5571EC: dwarf2out_source_line (dwarf2out.c:14580)
==15364==    by 0x5B38B7: final_scan_insn (final.c:2148)
==15364==    by 0x5B4A0A: final (final.c:1692)
==15364==    by 0x5B4CD5: rest_of_handle_final (final.c:4096)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C3F: htab_hash_string (hashtab.c:812)
==15364==    by 0x555F6D: lookup_filename (dwarf2out.c:14463)
==15364==    by 0x5571EC: dwarf2out_source_line (dwarf2out.c:14580)
==15364==    by 0x5B38B7: final_scan_insn (final.c:2148)
==15364==    by 0x5B4A0A: final (final.c:1692)
==15364==    by 0x5B4CD5: rest_of_handle_final (final.c:4096)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364==  Address 0x56e06b1 is 1 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C20: htab_hash_string (hashtab.c:812)
==15364==    by 0xB882F3: htab_expand (hashtab.c:540)
==15364==    by 0xB88442: htab_traverse (hashtab.c:763)
==15364==    by 0x5704FA: dwarf2out_finish (dwarf2out.c:15151)
==15364==    by 0x71338D: toplev_main (toplev.c:1011)
==15364==    by 0x52C51C3: (below main) (in /lib/libc-2.7.so)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0xB87C3F: htab_hash_string (hashtab.c:812)
==15364==    by 0xB882F3: htab_expand (hashtab.c:540)
==15364==    by 0xB88442: htab_traverse (hashtab.c:763)
==15364==    by 0x5704FA: dwarf2out_finish (dwarf2out.c:15151)
==15364==    by 0x71338D: toplev_main (toplev.c:1011)
==15364==    by 0x52C51C3: (below main) (in /lib/libc-2.7.so)
==15364==  Address 0x56e06b1 is 1 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x551F0B: file_table_relative_p (dwarf2out.c:15126)
==15364==    by 0xB87BB7: htab_traverse_noresize (hashtab.c:750)
==15364==    by 0x5704FA: dwarf2out_finish (dwarf2out.c:15151)
==15364==    by 0x71338D: toplev_main (toplev.c:1011)
==15364==    by 0x52C51C3: (below main) (in /lib/libc-2.7.so)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== Invalid read of size 1
==15364==    at 0x711600: output_quoted_string (toplev.c:652)
==15364==    by 0x557170: maybe_emit_file (dwarf2out.c:14495)
==15364==    by 0x55B698: value_format (dwarf2out.c:7038)
==15364==    by 0x55B924: build_abbrev_table (dwarf2out.c:6724)
==15364==    by 0x55B9B3: build_abbrev_table (dwarf2out.c:6753)
==15364==    by 0x55B9B3: build_abbrev_table (dwarf2out.c:6753)
==15364==    by 0x55B9B3: build_abbrev_table (dwarf2out.c:6753)
==15364==    by 0x55BAEE: output_comp_unit (dwarf2out.c:7452)
==15364==    by 0x5702C0: dwarf2out_finish (dwarf2out.c:15309)
==15364==    by 0x71338D: toplev_main (toplev.c:1011)
==15364==    by 0x52C51C3: (below main) (in /lib/libc-2.7.so)
==15364==  Address 0x56e06b0 is 0 bytes inside a block of size 8 free'd
==15364==    at 0x4C22B6E: free (vg_replace_malloc.c:323)
==15364==    by 0x80C9A8: number_of_iterations_ne (tree-ssa-loop-niter.c:622)
==15364==    by 0x813042: number_of_iterations_cond (tree-ssa-loop-niter.c:1285)
==15364==    by 0x814997: number_of_iterations_exit (tree-ssa-loop-niter.c:1768)
==15364==    by 0x7A266C: number_of_latch_executions (tree-scalar-evolution.c:2344)
==15364==    by 0x7A95AF: scev_const_prop (tree-scalar-evolution.c:2842)
==15364==    by 0x68DC99: execute_one_pass (passes.c:1292)
==15364==    by 0x68DED4: execute_pass_list (passes.c:1342)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x68DEEC: execute_pass_list (passes.c:1343)
==15364==    by 0x77CEA5: tree_rest_of_compilation (tree-optimize.c:421)
==15364==    by 0x92BA81: cgraph_expand_function (cgraphunit.c:1148)
==15364== 
==15364== ERROR SUMMARY: 1145 errors from 15 contexts (suppressed: 7 from 1)
==15364== malloc/free: in use at exit: 701,599 bytes in 4,066 blocks.
==15364== malloc/free: 75,791 allocs, 71,725 frees, 46,790,043 bytes allocated.
==15364== For counts of detected errors, rerun with: -v
==15364== searching for pointers to 4,066 not-freed blocks.
==15364== checked 5,997,736 bytes.
==15364== 
==15364== LEAK SUMMARY:
==15364==    definitely lost: 36,496 bytes in 174 blocks.
==15364==      possibly lost: 64 bytes in 2 blocks.
==15364==    still reachable: 665,039 bytes in 3,890 blocks.
==15364==         suppressed: 0 bytes in 0 blocks.
==15364== Rerun with --leak-check=full to see details of leaked memory.
Comment 2 Laurynas Biveinis 2008-06-20 13:57:49 UTC
Subject: Bug 34908

Author: lauras
Date: Fri Jun 20 13:57:00 2008
New Revision: 136989

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136989
Log:
2008-06-20  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
	    Tobias Burnus  <burnus@net-b.de>

	PR fortran/34908
	PR fortran/36276
	* scanner.c (preprocessor_line): do not call gfc_free for
	current_file->filename if it differs from filename.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/scanner.c

Comment 3 Tobias Burnus 2008-06-21 10:04:21 UTC
Close as FIXED (on the trunk/4.4).

For follow up, see PR 36342 (for fixing 4.3) and PR 36276.
Comment 4 Laurynas Biveinis 2008-06-21 15:30:29 UTC
Subject: Bug 34908

Author: lauras
Date: Sat Jun 21 15:29:44 2008
New Revision: 137001

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137001
Log:
2008-06-20  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
	    Tobias Burnus  <burnus@net-b.de>

	PR fortran/34908
	PR fortran/36276
	* scanner.c (preprocessor_line): do not call gfc_free for
	current_file->filename if it differs from filename.


Modified:
    branches/gcc-4_3-branch/gcc/fortran/ChangeLog
    branches/gcc-4_3-branch/gcc/fortran/scanner.c