public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45140]  New: valgrind errors when compiling gfortran.dg/typebound_proc_15.f03
@ 2010-07-30  9:12 ubizjak at gmail dot com
  2010-07-30  9:38 ` [Bug fortran/45140] [OOP] " janus at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: ubizjak at gmail dot com @ 2010-07-30  9:12 UTC (permalink / raw)
  To: gcc-bugs

$ valgrind ~/gcc-build/gcc/f951 -O -std=f2003 typebound_proc_15.f03 
==22333== Memcheck, a memory error detector
==22333== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==22333== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==22333== Command: /home/uros/gcc-build/gcc/f951 -O -std=f2003
typebound_proc_15.f03
==22333== 
typebound_proc_15.f03:15.23:

  procedure :: bar, baz  ! { dg-error "PROCEDURE list" }
                       1
Error: Fortran 2008: PROCEDURE list at (1)
==22333== Invalid read of size 8
==22333==    at 0x4ACEF7: add_proc_comp (class.c:217)
==22333==    by 0x4AD628: add_procs_to_declared_vtab (class.c:305)
==22333==    by 0x4AD59A: gfc_find_derived_vtab (class.c:408)
==22333==    by 0x4ADA88: gfc_build_class_symbol (class.c:177)
==22333==    by 0x4B4CC5: build_sym (decl.c:1162)
==22333==    by 0x4BA6C6: gfc_match_data_decl (decl.c:1754)
==22333==    by 0x4FAA99: match_word (parse.c:65)
==22333==    by 0x4FABFC: decode_statement (parse.c:285)
==22333==    by 0x4FC754: next_statement (parse.c:727)
==22333==    by 0x4FDC64: parse_spec (parse.c:2434)
==22333==    by 0x4FF5A8: parse_progunit (parse.c:3940)
==22333==    by 0x4FF8AD: parse_contained (parse.c:3880)
==22333==  Address 0x5afd758 is 40 bytes inside a block of size 48 free'd
==22333==    at 0x4C20A31: free (vg_replace_malloc.c:325)
==22333==    by 0x52AABA: gfc_delete_symtree (symbol.c:2395)
==22333==    by 0x52BB46: gfc_undo_symbols (symbol.c:2894)
==22333==    by 0x4FA99A: reject_statement (parse.c:1659)
==22333==    by 0x4FAABD: match_word (parse.c:70)
==22333==    by 0x4FB2E4: decode_statement (parse.c:425)
==22333==    by 0x4FC754: next_statement (parse.c:727)
==22333==    by 0x4FDF04: parse_spec (parse.c:1882)
==22333==    by 0x5003FF: gfc_parse_file (parse.c:4126)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333== 
==22333== Invalid read of size 1
==22333==    at 0x515C45: resolve_fl_derived (resolve.c:10894)
==22333==    by 0x514127: resolve_symbol (resolve.c:11508)
==22333==    by 0x526986: traverse_ns (symbol.c:3364)
==22333==    by 0x5121E3: resolve_types (resolve.c:12973)
==22333==    by 0x50BC93: gfc_resolve (resolve.c:13069)
==22333==    by 0x50051A: gfc_parse_file (parse.c:4383)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333==  Address 0x5afd58c is 76 bytes inside a block of size 424 free'd
==22333==    at 0x4C20A31: free (vg_replace_malloc.c:325)
==22333==    by 0x52BCFF: gfc_undo_symbols (symbol.c:2900)
==22333==    by 0x4FA99A: reject_statement (parse.c:1659)
==22333==    by 0x4FAABD: match_word (parse.c:70)
==22333==    by 0x4FB2E4: decode_statement (parse.c:425)
==22333==    by 0x4FC754: next_statement (parse.c:727)
==22333==    by 0x4FDF04: parse_spec (parse.c:1882)
==22333==    by 0x5003FF: gfc_parse_file (parse.c:4126)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333== 
==22333== Invalid read of size 1
==22333==    at 0x515C56: resolve_fl_derived (resolve.c:10900)
==22333==    by 0x514127: resolve_symbol (resolve.c:11508)
==22333==    by 0x526986: traverse_ns (symbol.c:3364)
==22333==    by 0x5121E3: resolve_types (resolve.c:12973)
==22333==    by 0x50BC93: gfc_resolve (resolve.c:13069)
==22333==    by 0x50051A: gfc_parse_file (parse.c:4383)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333==  Address 0x5afd592 is 82 bytes inside a block of size 424 free'd
==22333==    at 0x4C20A31: free (vg_replace_malloc.c:325)
==22333==    by 0x52BCFF: gfc_undo_symbols (symbol.c:2900)
==22333==    by 0x4FA99A: reject_statement (parse.c:1659)
==22333==    by 0x4FAABD: match_word (parse.c:70)
==22333==    by 0x4FB2E4: decode_statement (parse.c:425)
==22333==    by 0x4FC754: next_statement (parse.c:727)
==22333==    by 0x4FDF04: parse_spec (parse.c:1882)
==22333==    by 0x5003FF: gfc_parse_file (parse.c:4126)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333== 
==22333== Invalid read of size 1
==22333==    at 0x515C5D: resolve_fl_derived (resolve.c:10901)
==22333==    by 0x514127: resolve_symbol (resolve.c:11508)
==22333==    by 0x526986: traverse_ns (symbol.c:3364)
==22333==    by 0x5121E3: resolve_types (resolve.c:12973)
==22333==    by 0x50BC93: gfc_resolve (resolve.c:13069)
==22333==    by 0x50051A: gfc_parse_file (parse.c:4383)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333==  Address 0x5afd588 is 72 bytes inside a block of size 424 free'd
==22333==    at 0x4C20A31: free (vg_replace_malloc.c:325)
==22333==    by 0x52BCFF: gfc_undo_symbols (symbol.c:2900)
==22333==    by 0x4FA99A: reject_statement (parse.c:1659)
==22333==    by 0x4FAABD: match_word (parse.c:70)
==22333==    by 0x4FB2E4: decode_statement (parse.c:425)
==22333==    by 0x4FC754: next_statement (parse.c:727)
==22333==    by 0x4FDF04: parse_spec (parse.c:1882)
==22333==    by 0x5003FF: gfc_parse_file (parse.c:4126)
==22333==    by 0x536DA7: gfc_be_parse_file (f95-lang.c:241)
==22333==    by 0x82824D: toplev_main (toplev.c:945)
==22333==    by 0x56E2993: (below main) (in /lib64/libc-2.5.so)
==22333== 

Analyzing compilation unit

Execution times (seconds)
 callgraph construction:   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall   
   0 kB ( 0%) ggc
 parser                :   1.52 (42%) usr   0.04 (67%) sys   1.58 (42%) wall   
 773 kB (76%) ggc
 varconst              :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 1%) wall   
   0 kB ( 0%) ggc
 symout                :   0.02 ( 1%) usr   0.00 ( 0%) sys   0.02 ( 1%) wall   
  32 kB ( 3%) ggc
 TOTAL                 :   3.61             0.06             3.73              
1013 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
==22333== 
==22333== HEAP SUMMARY:
==22333==     in use at exit: 378,772 bytes in 1,074 blocks
==22333==   total heap usage: 2,242 allocs, 1,168 frees, 864,216 bytes
allocated
==22333== 
==22333== LEAK SUMMARY:
==22333==    definitely lost: 5,640 bytes in 5 blocks
==22333==    indirectly lost: 11,744 bytes in 56 blocks
==22333==      possibly lost: 16,064 bytes in 2 blocks
==22333==    still reachable: 345,324 bytes in 1,011 blocks
==22333==         suppressed: 0 bytes in 0 blocks
==22333== Rerun with --leak-check=full to see details of leaked memory
==22333== 
==22333== For counts of detected and suppressed errors, rerun with: -v
==22333== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 4 from 4)

I believe that this problem is also the reason for segfault in [1].

[1] http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg02656.html


-- 
           Summary: valgrind errors when compiling
                    gfortran.dg/typebound_proc_15.f03
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ubizjak at gmail dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45140


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/45140] [OOP] valgrind errors when compiling gfortran.dg/typebound_proc_15.f03
  2010-07-30  9:12 [Bug fortran/45140] New: valgrind errors when compiling gfortran.dg/typebound_proc_15.f03 ubizjak at gmail dot com
@ 2010-07-30  9:38 ` janus at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-07-30  9:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from janus at gcc dot gnu dot org  2010-07-30 09:38 -------


*** This bug has been marked as a duplicate of 44584 ***


-- 

janus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45140


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-30  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30  9:12 [Bug fortran/45140] New: valgrind errors when compiling gfortran.dg/typebound_proc_15.f03 ubizjak at gmail dot com
2010-07-30  9:38 ` [Bug fortran/45140] [OOP] " janus at gcc dot gnu dot org

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).