public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47002] New: segmentation fault in find_uses_to_rename_use
@ 2010-12-18 12:45 dcb314 at hotmail dot com
  2010-12-18 14:26 ` [Bug c/47002] [4.6 Regression] " hjl.tools at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2010-12-18 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: segmentation fault in find_uses_to_rename_use
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


Created attachment 22809
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22809
C source code

I just tried to compile package covered-0.7.7 with the latest 4.6
snapshot 20101211 on a Fedora Linux box. The compiler said

../src/vector.c: In function 'vector_set_value_ulong':
../src/vector.c:1857:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

valgrind says

==11010== Invalid read of size 8
==11010==    at 0x8B1809: find_uses_to_rename_use (tree-ssa-loop-manip.c:1246)
==11010==    by 0x8B1A27: find_uses_to_rename_bb (tree-ssa-loop-manip.c:301)
==11010==    by 0x8B216D: rewrite_into_loop_closed_ssa
(tree-ssa-loop-manip.c:331)
==11010==    by 0x82A239: distribute_loop (tree-loop-distribution.c:1020)
==11010==    by 0x82B15C: tree_loop_distribution
(tree-loop-distribution.c:1146)
==11010==    by 0x74510E: execute_one_pass (passes.c:1553)
==11010==    by 0x7453B4: execute_pass_list (passes.c:1608)
==11010==    by 0x7453C6: execute_pass_list (passes.c:1609)
==11010==    by 0x7453C6: execute_pass_list (passes.c:1609)
==11010==    by 0x838CD5: tree_rest_of_compilation (tree-optimize.c:422)
==11010==    by 0x9D6540: cgraph_expand_function (cgraphunit.c:1508)
==11010==    by 0x9D8AA9: cgraph_optimize (cgraphunit.c:1567)
==11010==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
==11010==

Source code attached. Flag -O3 required.


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

* [Bug c/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
@ 2010-12-18 14:26 ` hjl.tools at gmail dot com
  2010-12-20  5:23 ` [Bug tree-optimization/47002] " spop at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-18 14:26 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.12.18 14:26:06
                 CC|                            |spop at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
            Summary|segmentation fault in       |[4.6 Regression]
                   |find_uses_to_rename_use     |segmentation fault in
                   |                            |find_uses_to_rename_use
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-18 14:26:06 UTC ---
It is caused by revision 162822:

http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00033.html


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
  2010-12-18 14:26 ` [Bug c/47002] [4.6 Regression] " hjl.tools at gmail dot com
@ 2010-12-20  5:23 ` spop at gcc dot gnu.org
  2010-12-20  5:25 ` spop at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2010-12-20  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sebastian Pop <spop at gcc dot gnu.org> 2010-12-20 05:23:29 UTC ---
I cannot reproduce the error on amd64-linux with "./cc1 -O3 bug.i"
Please report the exact flags and the architecture.

However I can see several unrelated memory leaks (i.e., not the one reported)
with 
valgrind --leak-check=full ./cc1 -O3 bug.i


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
  2010-12-18 14:26 ` [Bug c/47002] [4.6 Regression] " hjl.tools at gmail dot com
  2010-12-20  5:23 ` [Bug tree-optimization/47002] " spop at gcc dot gnu.org
@ 2010-12-20  5:25 ` spop at gcc dot gnu.org
  2010-12-22  6:24 ` spop at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2010-12-20  5:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sebastian Pop <spop at gcc dot gnu.org> 2010-12-20 05:25:00 UTC ---
I tested trunk@168000.


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2010-12-20  5:25 ` spop at gcc dot gnu.org
@ 2010-12-22  6:24 ` spop at gcc dot gnu.org
  2010-12-23 16:26 ` spop at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2010-12-22  6:24 UTC (permalink / raw)
  To: gcc-bugs

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

Sebastian Pop <spop at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #4 from Sebastian Pop <spop at gcc dot gnu.org> 2010-12-22 06:23:54 UTC ---
Patch fixing the memory leaks related to loop distribution:
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01670.html

I still cannot reproduce the error reported in this PR.
HJ, it seems like you were able to see the ICE.
Could you please specify which flags and architecture you used?
Thanks.


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2010-12-22  6:24 ` spop at gcc dot gnu.org
@ 2010-12-23 16:26 ` spop at gcc dot gnu.org
  2010-12-31 11:19 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2010-12-23 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Sebastian Pop <spop at gcc dot gnu.org> 2010-12-23 16:25:59 UTC ---
Author: spop
Date: Thu Dec 23 16:25:52 2010
New Revision: 168210

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168210
Log:
Fix PR47002: memory leaks.

2010-12-23  Sebastian Pop  <sebastian.pop@amd.com>

    PR tree-optimization/47002
    * tree-data-ref.c (compute_data_dependences_for_loop): Pass in a
    pointer to the loop_nest.
    (analyze_all_data_dependences): Initialize and free the loop_nest.
    (free_dependence_relations): Do not free loop_nest.
    (build_rdg): Pass in the loop_nest, datarefs, and dependence_relations.
    (free_rdg): Also free the data on edges.
    * tree-data-ref.h (build_rdg): Update declaration.
    (compute_data_dependences_for_loop): Same.
    * tree-if-conv.c (if_convertible_loop_p_1): Pass in the loop_nest.
    (if_convertible_loop_p): Allocate and free loop_nest.
    * tree-loop-distribution.c (rdg_flag_loop_exits): Free conds.
    (free_rdg_components): VEC_free components.
    (distribute_loop): Update call to build_rdg.  Allocate and free
    loop_nest, datarefs, and dependence_relations.
    * tree-loop-linear.c (linear_transform_loops): Allocate and free
    loop_nest.
    * tree-parloops.c (loop_parallel_p): Same.
    * tree-predcom.c (tree_predictive_commoning_loop): Same.
    * tree-vect-data-refs.c (vect_analyze_data_refs): Pass to
    compute_data_dependences_for_loop a pointer to LOOP_VINFO_LOOP_NEST.
    * tree-vect-loop.c (new_loop_vec_info): Initialize LOOP_VINFO_LOOP_NEST.
    (destroy_loop_vec_info): Free LOOP_VINFO_MAY_ALIAS_DDRS and
    LOOP_VINFO_LOOP_NEST.
    * tree-vect-slp.c (destroy_bb_vec_info): Call free_data_refs and
    free_dependence_relations.
    * tree-vectorizer.h (struct _loop_vec_info): Add a field loop_nest.
    (LOOP_VINFO_LOOP_NEST): New.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-data-ref.c
    trunk/gcc/tree-data-ref.h
    trunk/gcc/tree-if-conv.c
    trunk/gcc/tree-loop-distribution.c
    trunk/gcc/tree-loop-linear.c
    trunk/gcc/tree-parloops.c
    trunk/gcc/tree-predcom.c
    trunk/gcc/tree-vect-data-refs.c
    trunk/gcc/tree-vect-loop.c
    trunk/gcc/tree-vect-slp.c
    trunk/gcc/tree-vectorizer.h


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2010-12-23 16:26 ` spop at gcc dot gnu.org
@ 2010-12-31 11:19 ` jakub at gcc dot gnu.org
  2010-12-31 12:43 ` dcb314 at hotmail dot com
  2010-12-31 14:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-31 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-31 11:18:55 UTC ---
Can't reproduce with neither 20101217 trunk nor current trunk on x86_64-linux
either, can the reporter and/or hjl double check current trunk?
Thanks.


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2010-12-31 11:19 ` jakub at gcc dot gnu.org
@ 2010-12-31 12:43 ` dcb314 at hotmail dot com
  2010-12-31 14:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2010-12-31 12:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from dcb <dcb314 at hotmail dot com> 2010-12-31 12:43:27 UTC ---
(In reply to comment #6)
> Can't reproduce with neither 20101217 trunk nor current trunk on x86_64-linux
> either, can the reporter and/or hjl double check current trunk?
> Thanks.

I rechecked, and the problem seems to have gone away as of 
snapshot 20101225.

I am not quite clear if SP's patch is for the memory leaks
only or has fixed the original problem as well.


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

* [Bug tree-optimization/47002] [4.6 Regression] segmentation fault in find_uses_to_rename_use
  2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2010-12-31 12:43 ` dcb314 at hotmail dot com
@ 2010-12-31 14:13 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-31 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-31 14:13:02 UTC ---
Assuming it is fixed then.


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

end of thread, other threads:[~2010-12-31 14:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-18 12:45 [Bug c/47002] New: segmentation fault in find_uses_to_rename_use dcb314 at hotmail dot com
2010-12-18 14:26 ` [Bug c/47002] [4.6 Regression] " hjl.tools at gmail dot com
2010-12-20  5:23 ` [Bug tree-optimization/47002] " spop at gcc dot gnu.org
2010-12-20  5:25 ` spop at gcc dot gnu.org
2010-12-22  6:24 ` spop at gcc dot gnu.org
2010-12-23 16:26 ` spop at gcc dot gnu.org
2010-12-31 11:19 ` jakub at gcc dot gnu.org
2010-12-31 12:43 ` dcb314 at hotmail dot com
2010-12-31 14:13 ` jakub at gcc dot gnu.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).