Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: gnusrc/gnu/dist/toolchain/gcc



mmmm! This is really weirdo bug. Thanks for fixing it.

Jaromir

Krister Walfridsson wrote:
> 
> Module Name:  gnusrc
> Committed By: kristerw
> Date:         Mon Dec 16 19:33:51 UTC 2002
> 
> Modified Files:
>       gnusrc/gnu/dist/toolchain/gcc: except.c integrate.c
> 
> Log Message:
> Place EH labels on the permanent obstack. Fixes PR 18314.
> 
> Background:
> Originally, the EH labels were placed on the permanent obstack, which
> could end up using a lot of memory (for heavy inlining) since inlined
> labels also needed to be permanent as a result of this.
> 
> This was changed in
> 
>    Wed Dec  9 09:12:40 1998  Andrew MacLeod  <amacleod%cygnus.com@localhost>
> 
>       * except.h (struct handler_info): Add handler_number field.
>       * except.c (gen_exception_label): EH labels no longer need to be
>       on the permanent obstack.
>       (get_new_handler): Set the label number field.
>       (output_exception_table_entry): Regenerate handler label reference
>       from the label number field.
>       (init_eh): Remove a blank line.
>       * integrate.c (get_label_from_map): Labels no longer need to be
>       on the permanent obstack.
> 
> by using the label numbers instead of the label structures in most cases.
> The operative word here is "most" cases. Addresses to the EH RTX was still
> used in (at least) flow.c, that now used freed memory. Oops.
> 
> For this to happen, the freed address of the RTX representing a EH label
> must be reused for a new label that is located in dead code. delete_block()
> will then see that this RTX is mentioned in the EH table, and (incorrectly)
> remove the exception handler.
> 
> This might be seen when, for example, compiling
> src/gnu/dist/groff/src/roff/troff/node.cc for m68k.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.1.1.1 -r1.2 gnusrc/gnu/dist/toolchain/gcc/except.c \
>     gnusrc/gnu/dist/toolchain/gcc/integrate.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


-- 
Jaromir Dolecek <jdolecek%NetBSD.org@localhost>            
http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-



Home | Main Index | Thread Index | Old Index