public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: On purpose ???
       [not found] <199808101712.TAA18081@mururoa.inria.fr>
@ 1998-08-13 21:56 ` Jeffrey A Law
  1998-10-31  4:38 ` Jeffrey A Law
  1 sibling, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 1998-08-13 21:56 UTC (permalink / raw)
  To: Theodore Papadopoulo; +Cc: egcs-bugs, meissner

  In message <199808101712.TAA18081@mururoa.inria.fr>you write:
  > 
  > 	While browsing the warning reports of two different builds (
  > sparc-sun-solaris2.6 and ) I noticed the following message:
  > 
  >    1 unsigned value < 0 is always 0
  > 
  > This happens in gcc/regclass.c at line 1786 in the allocate_reg_info 
  > function:
  > 
  >   /* Free up all storage allocated */
  >   if (num_regs < 0)                    ----> num_regs is unsigned
  > 
  > This looks wrong. It seems to have been introduced after the change 
  > (Thu Jul  2 14:16:11 1998  Michael Meissner  <meissner@cygnus.com>: 
  > see the full entry at the end of the mail).
I suspect that we are actually missing calls to allocate_reg_info which
are expected to pass in -1 to free the storage.

Meissner is on vacation, so I can't actually ask him when it's supposed
to be safe to free up the reg_info memory.  So we've got a leak, hopefully
Michael will fix it after he returns from vacation.

jeff


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

* Re: On purpose ???
       [not found] <199808101712.TAA18081@mururoa.inria.fr>
  1998-08-13 21:56 ` On purpose ??? Jeffrey A Law
@ 1998-10-31  4:38 ` Jeffrey A Law
  1 sibling, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 1998-10-31  4:38 UTC (permalink / raw)
  To: Theodore Papadopoulo; +Cc: egcs-bugs

  In message <199808101712.TAA18081@mururoa.inria.fr>you write:
  > 
  > 	While browsing the warning reports of two different builds (
  > sparc-sun-solaris2.6 and ) I noticed the following message:
  > 
  >    1 unsigned value < 0 is always 0
  > 
  > This happens in gcc/regclass.c at line 1786 in the allocate_reg_info 
  > function:
  > 
  >   /* Free up all storage allocated */
  >   if (num_regs < 0)                    ----> num_regs is unsigned
  > 
  > This looks wrong. It seems to have been introduced after the change 
  > (Thu Jul  2 14:16:11 1998  Michael Meissner  <meissner@cygnus.com>: 
  > see the full entry at the end of the mail).
  > 
  > Now, AFAICT it seems that allocate_reg_info is never called with a 
  > negative parameter so it's not really a problem and we could just zap
  > this piece of code (it looks that the storage is never freed ?? Maybe 
  > it's not worth bothering).
  > 
  >    All this is not really important, but still I thought that it was 
  > better to mention it.
This "problem" has been fixed in the development tree.  The code to deallocate
the reg info has been moved into its own routine and is called at the end of
the compilation unit.

jeff


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

end of thread, other threads:[~1998-10-31  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199808101712.TAA18081@mururoa.inria.fr>
1998-08-13 21:56 ` On purpose ??? Jeffrey A Law
1998-10-31  4:38 ` Jeffrey A Law

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