bugThe FreeType Project - Bugs: bug #27490, FreeType2 built by GCC-4.2.x -O2...

 
 

bug #27490: FreeType2 built by GCC-4.2.x -O2 is crashing

Submitted by:  suzuki toshiya <mpsuzuki>
Submitted on:  Mon 21 Sep 2009 12:03:29 PM UTC  
 
Severity: 1 - WishItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: suzuki toshiya <mpsuzuki>Open/Closed: Closed
Planned Release: 2.3.10

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 29 Sep 2009 06:06:08 PM UTC, comment #2:

This issue was resolved by the patch to improve strict aliasing
and drop the tricky casts in cache driver, bug #27441.
Now freetype2 on git head is not crashed even when it is built
by GCC-4.2.3 -O2.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Mon 21 Sep 2009 02:44:25 PM UTC, comment #1:

For the developers interested in GCC-4.3.0 pre-release:
From the end of 2006 to mid of Feb (?) of 2007, GCC-4.3.x
branch was unable to bootstrap with recent GNU libc.
I've built GCC-4.3.x on another machine with older GNU
libc (2.2.5). For detail, please check:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30678

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Mon 21 Sep 2009 12:03:29 PM UTC, original submission:

As discussed in freetype-devel list:
http://lists.gnu.org/archive/html/freetype-devel/2009-03/msg00059.html
it is known freetype2 built by GCC-4.2.x -O2 is crashing.
It is also known that freetype2 built by GCC-4.3.x -O2 is not crashing.

I've investigated the revision of GCC-4.2.x that generates crashing
binary on FedoraCore11/i386. The crashing revision starts from
the pre-release of GCC-4.2.0:

commit a1ab46376685a6e38f8ba71c75dfd4c50d057f44
Author: steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun Feb 26 20:23:40 2006 +0000

gcc/
* common.opt (-floop-optimize, -frerun-loop-opt): Remove.
* tree-pass.h (pass_loop_optimize): Remove.
* passes.c (pass_loop_optimize): Never run it.
* toplev.c (backend_init): Don't call init_loop.
* opts.c (flag_loop_optimize_set): Remove.
(decode_options): Never set flag_loop_optimize or flag_rerun_loop_opt.
(common_handle_option) <OPT_floop_optimize>: Remove. Don't disable
the old RTL loop optimizer when profiling enabled.
* predict.c (tree_estimate_probability): Always strip builtin_expect.
* cfgcleanup.c (try_forward_edges): Don't avoid killing loop
pre-headers for the sake of the old RTL loop optimizer.
* Makefile.in: Remove all references to loop.o.

* doc/invoke.texi: Remove all references to -floop-optimize
and -frerun-loop-opt.

testsuite/
* gcc.dg/20031201-1.c: Don't use -frerun-loop-opt.
* g++.old-deja/g++.robertl/eb132.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111459 138bc75d-0d04-0410-96

And the problem is fixed in GCC-4.3.0 pre-release:

commit 49290934bff05cf0dff6c6268e56b944d8b6578d
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Jan 11 16:50:32 2007 +0000

PR tree-optimization/1046
* tree-tailcall.c (suitable_for_tail_call_opt_p): Use TREE_ADDRESSABLE
when alias info is not ready.
(pass_tail_recursion): Do not require aliasing.
* tree-ssa-copyrename.c (pass_rename_ssa_cop): Likewise.
* tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Likewise.
* tree-ssa-copy.c (pass_copy_prop): Likewise.
* tree-ssa-forwprop.c (pass_forwprop): Likewise.
* tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Likewise.
* passes.c (init_optimization_passes): Execute rename_ssa_copies,
ccp, forwprop, copy_prop, merge_phi, copy_prop, dce and tail recursion
before inlining.
* tree-ssa-operands.c (add_virtual_operand, get_indirect_ref_operand):
When aliasing is not build, mark statement as volatile.

* gcc.dg/tree-ssa/tailrecursion-4.c: Update dump file.
* gcc.dg/tree-ssa/tailrecursion-1.c: Update dump file.
* gcc.dg/tree-ssa/tailrecursion-2.c: Update dump file.
* gcc.dg/tree-ssa/tailrecursion-3.c: Update dump file.
* gcc.dg/tree-ssa/pr21658.c: Likewise.
* gcc.dg/tree-ssa/pr15349.c: Likewise.
* gcc.dg/tree-ssa/pr25501.c: Likewise.
* gcc.dg/tree-ssa/vrp11.c: Make more complex so it still test
transformation in question.
* gcc.dg/tree-ssa/vrp05.c: Likewise.
* gcc.dg/tree-ssa/pr20701.c: Likewise.
* gcc.dg/always_inline3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120681 138bc75d-0d04-0410-961f-82ee72b054a4

Further investigation is needed to check the compiler makes crashing
binary (especially non-x86 arch has same issue?), but all of GCC-4.2.x
seem to have this issue. It is expected that configure checks 4.2.x and
warn it, and disabling the optimize flag if possible.

I don't know how Linux distributors were building FT2 packages while
their default compilers were GCC-4.2.x.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by mpsuzuki (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 02 Nov 2009 03:14:54 PM UTCwlStatusNeed Info=>Fixed
    Tue 29 Sep 2009 06:06:08 PM UTCmpsuzukiOpen/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.10

    Back to the top


    Powered by Savane 3.1-cleanup1