Re: [jakub@redhat.com: [3.3.2 PATCH] Backport invalid C++ tree sharing fix + testcase]

2003-10-03 Thread Matthias Klose
I'll prepare another upload on Sunday.

Daniel Jacobowitz writes:
> I'm pretty sure this is the patch we need.
> 
> - Forwarded message from Jakub Jelinek <[EMAIL PROTECTED]> -
> 
> Date: Wed, 1 Oct 2003 20:35:19 +0200
> From: Jakub Jelinek <[EMAIL PROTECTED]>
> Subject: [3.3.2 PATCH] Backport invalid C++ tree sharing fix + testcase
> To: Mark Mitchell <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Reply-To: Jakub Jelinek <[EMAIL PROTECTED]>
> 
> Hi!
> 
> The following testcase is miscompiled on IA-32 (foo has an endless loop)
> in 3.3.x.
> It is a regression from 3.2.x and fixed again on the trunk.
> I tracked it down to:
> http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01063.html
> Below is backport of the patch to gcc-3_3-branch.
> Ok to commit?
> 
> 2003-07-09  Mark Mitchell  <[EMAIL PROTECTED]>
> 
>   * cp-tree.h (break_out_calls): Remove declaration.
>   * tree.c (break_out_calls): Remove.
>   * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
> 
> 2003-10-01  Jakub Jelinek  <[EMAIL PROTECTED]>
> 
>   * g++.dg/opt/cond1.C: New test.
> 
> --- gcc/testsuite/g++.dg/opt/cond1.C.jj   2003-09-15 15:40:47.0 
> +0200
> +++ gcc/testsuite/g++.dg/opt/cond1.C  2003-10-01 14:39:32.0 +0200
> @@ -0,0 +1,24 @@
> +// { dg-do run }
> +// { dg-options "-O2" }
> +
> +struct D { int x; };
> +struct W
> +{
> +  W () {}
> +  D & operator * () { return d; }
> +  D d;
> +};
> +
> +int
> +foo (int y)
> +{
> +  W m;
> +  (*m).x = (y > 1 ? y : 0);
> +  return (*m).x;
> +}
> +
> +int
> +main ()
> +{
> +  return (foo (6) != 6);
> +}
> --- gcc/cp/cp-tree.h.jj   2003-10-01 12:08:54.0 +0200
> +++ gcc/cp/cp-tree.h  2003-10-01 22:23:33.0 +0200
> @@ -4317,7 +4317,6 @@ extern tree build_min   PARAMS 
> ((enum t
>  extern tree build_min_nt PARAMS ((enum tree_code, ...));
>  extern tree build_cplus_new  PARAMS ((tree, tree));
>  extern tree get_target_expr  PARAMS ((tree));
> -extern tree break_out_calls  PARAMS ((tree));
>  extern tree build_cplus_method_type  PARAMS ((tree, tree, tree));
>  extern tree build_cplus_staticfn_typePARAMS ((tree, tree, 
> tree));
>  extern tree build_cplus_array_type   PARAMS ((tree, tree));
> --- gcc/cp/typeck.c.jj2003-09-16 17:25:55.0 +0200
> +++ gcc/cp/typeck.c   2003-10-01 22:23:06.0 +0200
> @@ -5502,44 +5502,8 @@ build_modify_expr (lhs, modifycode, rhs)
>if (newrhs == error_mark_node)
>  return error_mark_node;
>  
> -  if (TREE_CODE (newrhs) == COND_EXPR)
> -{
> -  tree lhs1;
> -  tree cond = TREE_OPERAND (newrhs, 0);
> -
> -  if (TREE_SIDE_EFFECTS (lhs))
> - cond = build_compound_expr (tree_cons
> - (NULL_TREE, lhs,
> -  build_tree_list (NULL_TREE, cond)));
> -
> -  /* Cannot have two identical lhs on this one tree (result) as preexpand
> -  calls will rip them out and fill in RTL for them, but when the
> -  rtl is generated, the calls will only be in the first side of the
> -  condition, not on both, or before the conditional jump! (mrs) */
> -  lhs1 = break_out_calls (lhs);
> -
> -  if (lhs == lhs1)
> - /* If there's no change, the COND_EXPR behaves like any other rhs.  */
> - result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR,
> - lhstype, lhs, newrhs);
> -  else
> - {
> -   tree result_type = TREE_TYPE (newrhs);
> -   /* We have to convert each arm to the proper type because the
> -  types may have been munged by constant folding.  */
> -   result
> - = build (COND_EXPR, result_type, cond,
> -  build_modify_expr (lhs, modifycode,
> - cp_convert (result_type,
> - TREE_OPERAND (newrhs, 1))),
> -  build_modify_expr (lhs1, modifycode,
> - cp_convert (result_type,
> - TREE_OPERAND (newrhs, 2;
> - }
> -}
> -  else
> -result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR,
> - lhstype, lhs, newrhs);
> +  result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR,
> +   lhstype, lhs, newrhs);
>  
>TREE_SIDE_EFFECTS (result) = 1;
>  
> --- gcc/cp/tree.c.jj  2003-05-16 00:06:44.0 +0200
> +++ gcc/cp/tree.c 2003-10-01 22:24:46.0 +0200
> @@ -375,97 +375,6 @@ get_target_expr (init)
>  {
>return build_target_expr_with_type (init, TREE_TYPE (init));
>  }
> -
> -/* Recursively perform a preorder search EXP for CALL_EXPRs, making
> -   copies where they are found.  Returns a deep copy all nodes transitively
> -   containing CALL_EXPRs.  */
> -
> -tree
> -break_out_calls (exp)
> - tree exp;
> -{
> -  register tree t1, t2 

Bug#128950: [Bug c/9072] -Wconversion should be split into two distinct flags

2003-10-03 Thread Jay dot St dot Pierre at Colorado dot EDU
PLEASE REPLY TO [EMAIL PROTECTED] ONLY, *NOT* [EMAIL PROTECTED]

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


Jay dot St dot Pierre at Colorado dot EDU changed:

   What|Removed |Added

 CC||Jay dot St dot Pierre at
   ||Colorado dot EDU


--- Additional Comments From Jay dot St dot Pierre at Colorado dot EDU  
2003-10-03 15:24 ---
Note that this is still an issue with 3.3.1.



--- You are receiving this mail because: ---
You reported the bug, or are watching the reporter.




Bug#213994: gcc-3.3: Please provide an overflow protection in the stock compiler

2003-10-03 Thread Javier Fernández-Sanguino Peña
Package: gcc-3.3
Version: 1:3.3.2-0pre4
Priority: wishlist
Tags: upstream

I would very much like stack/buffer overflow protection such as (StackGuard
[1] or to Stack Smashing Protector [2]) be available in Debian's stock
gcc-3.3 compiler. The people at Immunix are making an effort to integrate
StackGuard's latest version (3) into gcc, so maybe this will come by 
itself.

Even if Debian packages might not be compiled with this protection, it 
would make it easier for Debian-derived distributions to recompile packages 
if Debian's compilers already featured this option.

Regards

Javi


[1] http://www.immunix.org/stackguard.html
Used to build the Immunix distribution.
[2] http://www.research.ibm.com/trl/projects/security/ssp/
Used to build the Adamantix Debian-derived distribution.



pgpASJrnE21Vl.pgp
Description: PGP signature


Bug#214024: g++: when configure scripts are over 32768 g++ fails to compile test files

2003-10-03 Thread Chris Cheney
Package: g++-3.3
Version: 1:3.3.2-0pre4
Severity: grave

Adam Heath recommended I file this bug against gcc/g++ rather than
autoconf.

The issue is as follows:

configure is over 32767 lines long
configure generates a conftest.cc file

in that conftest.cc file is the line

'#line 32780 "configure"'

since the number is greater than 32767 g++ fails saying:

conftest.cc:2:7: line number out of range

which causes the test to fail and then configure thinks option is
unavailable.

configure:32757: checking for getdomainname
configure:32807: g++ -c -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall 
-pedantic -W -Wpointer-arith -Wwrite-string
s -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG 
-DNO_DEBUG -O2 -fno-exceptions -fno-ch
eck-new  -pedantic-errors  -DQT_THREAD_SUPPORT  -D_REENTRANT conftest.cc >&5
conftest.cc:1:7: line number out of range
configure:32810: $? = 1
configure: failed program was:
| #line 32780 "configure"
| /* confdefs.h.  */
...

This happens on my new arts build which has updated autotools, before
updating autotools the configure script was small enough that the 32767
limit didn't affect it.

Chris Cheney

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux calc 2.4.22-bk18 #1 SMP Mon Sep 15 12:55:07 CDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages g++-3.3 depends on:
ii  gcc-3.31:3.3.2-0pre4 The GNU C compiler
ii  gcc-3.3-base   1:3.3.2-0pre4 The GNU Compiler Collection (base 
ii  libc6  2.3.2-8   GNU C Library: Shared libraries an
ii  libstdc++5-3.3-dev 1:3.3.2-0pre4 The GNU Standard C++ Library v3 (d

-- no debconf information





Bug#214024: marked as done (g++: when configure scripts are over 32768 g++ fails to compile test files)

2003-10-03 Thread Debian Bug Tracking System
Your message dated Fri, 3 Oct 2003 20:09:23 -0500
with message-id <[EMAIL PROTECTED]>
and subject line closing bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--
Received: (at submit) by bugs.debian.org; 3 Oct 2003 23:57:47 +
>From [EMAIL PROTECTED] Fri Oct 03 18:57:46 2003
Return-path: <[EMAIL PROTECTED]>
Received: from (pico.surpasshosting.com) [64.5.56.18] 
by master.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1A5Znu-0003xH-00; Fri, 03 Oct 2003 18:57:46 -0500
Received: from conr-adsl-cheney.txucom.net ([207.70.165.48] helo=calc)
by pico.surpasshosting.com with esmtp (TLSv1:RC4-SHA:128)
(Exim 4.24)
id 1A5Znl-0002H1-Iz; Fri, 03 Oct 2003 18:57:37 -0500
Received: from ccheney by calc with local (Exim 4.22)
id 1A5Znt-0005fZ-2W; Fri, 03 Oct 2003 18:57:45 -0500
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Chris Cheney <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: g++: when configure scripts are over 32768 g++ fails to compile test 
files
X-Mailer: reportbug 2.32
Date: Fri, 03 Oct 2003 18:57:44 -0500
Message-Id: <[EMAIL PROTECTED]>
Sender: <[EMAIL PROTECTED]>
X-AntiAbuse: This header was added to track abuse, please include it with any 
abuse report
X-AntiAbuse: Primary Hostname - pico.surpasshosting.com
X-AntiAbuse: Original Domain - bugs.debian.org
X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12]
X-AntiAbuse: Sender Address Domain - conr-adsl-cheney.txucom.net
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-6.5 required=4.0
tests=BAYES_01,HAS_PACKAGE
version=2.53-bugs.debian.org_2003_10_03
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_03 
(1.174.2.15-2003-03-30-exp)

Package: g++-3.3
Version: 1:3.3.2-0pre4
Severity: grave

Adam Heath recommended I file this bug against gcc/g++ rather than
autoconf.

The issue is as follows:

configure is over 32767 lines long
configure generates a conftest.cc file

in that conftest.cc file is the line

'#line 32780 "configure"'

since the number is greater than 32767 g++ fails saying:

conftest.cc:2:7: line number out of range

which causes the test to fail and then configure thinks option is
unavailable.

configure:32757: checking for getdomainname
configure:32807: g++ -c -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall 
-pedantic -W -Wpointer-arith -Wwrite-string
s -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG 
-DNO_DEBUG -O2 -fno-exceptions -fno-ch
eck-new  -pedantic-errors  -DQT_THREAD_SUPPORT  -D_REENTRANT conftest.cc >&5
conftest.cc:1:7: line number out of range
configure:32810: $? = 1
configure: failed program was:
| #line 32780 "configure"
| /* confdefs.h.  */
...

This happens on my new arts build which has updated autotools, before
updating autotools the configure script was small enough that the 32767
limit didn't affect it.

Chris Cheney

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux calc 2.4.22-bk18 #1 SMP Mon Sep 15 12:55:07 CDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages g++-3.3 depends on:
ii  gcc-3.31:3.3.2-0pre4 The GNU C compiler
ii  gcc-3.3-base   1:3.3.2-0pre4 The GNU Compiler Collection (base 
ii  libc6  2.3.2-8   GNU C Library: Shared libraries an
ii  libstdc++5-3.3-dev 1:3.3.2-0pre4 The GNU Standard C++ Library v3 (d

-- no debconf information


---
Received: (at 214024-done) by bugs.debian.org; 4 Oct 2003 01:09:25 +
>From [EMAIL PROTECTED] Fri Oct 03 20:09:24 2003
Return-path: <[EMAIL PROTECTED]>
Received: from (pico.surpasshosting.com) [64.5.56.18] 
by master.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1A5avE-ZY-00; Fri, 03 Oct 2003 20:09:24 -0500
Received: from conr-adsl-cheney.txucom.net ([207.70.165.48] helo=calc)
by pico.surpasshosting.com with esmtp (TLSv1:RC4-SHA:128)
(Exim 4.24)
id 1A5av5-0005KZ-Bw
for [EMAIL PROTECTED]; Fri, 03 Oct 2003 20:09:15 -0500
Received: from ccheney by calc with local (Exim 4.22)
id 1A5avD-0002DE-KQ
for [EMAIL PROTECTED]; Fri, 03 Oct 2003 20:09:23 -0500
Date: Fri, 3 Oct 2003 20:09:23 -0500
From: Chris Cheney <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: closing bug
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; m