public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38781]  New: PR38151: valgrind finds problem
@ 2009-01-09  9:53 dcb314 at hotmail dot com
  2009-01-09 17:57 ` [Bug c/38781] " hjl dot tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2009-01-09  9:53 UTC (permalink / raw)
  To: gcc-bugs

In the testsuite for C is the file gcc.c-torture/execute/pr38151.c

I just tried to compile this file with the GNU C compiler
version 4.4 snapshot 20090102 using valgrind.

The debug output was

==32071== Conditional jump or move depends on uninitialised value(s)
==32071==    at 0x8A1544: merge_classes (i386.c:4787)
==32071==    by 0x8A69D6: classify_argument (i386.c:4912)
==32071==    by 0x8A727C: construct_container (i386.c:5205)
==32071==    by 0x8B1283: ix86_gimplify_va_arg (i386.c:6633)
==32071==    by 0x4BE4FA: gimplify_va_arg_expr (builtins.c:5025)
==32071==    by 0x5FE7F5: gimplify_expr (gimplify.c:6361)
==32071==    by 0x613B69: gimplify_modify_expr (gimplify.c:4230)
==32071==    by 0x5FDE09: gimplify_expr (gimplify.c:6333)

I've had a quick look at the code, and I suspect that
some array index checking around line 4912 of i386.c
might help.

This bug report may be related to the original source of
this code, pr38151.


-- 
           Summary: PR38151: valgrind finds problem
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
@ 2009-01-09 17:57 ` hjl dot tools at gmail dot com
  2009-01-09 17:58 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-09 17:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2009-01-09 17:57 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00463.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2009-
                   |                            |01/msg00463.html
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-09 17:57:21
               date|                            |


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


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

* [Bug c/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
  2009-01-09 17:57 ` [Bug c/38781] " hjl dot tools at gmail dot com
@ 2009-01-09 17:58 ` hjl dot tools at gmail dot com
  2009-01-14 15:16 ` [Bug target/38781] " hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-09 17:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|x86_64-suse-linux           |
 GCC target triplet|                            |x86_64-*-linux-gnu
   Target Milestone|---                         |4.4.0


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
  2009-01-09 17:57 ` [Bug c/38781] " hjl dot tools at gmail dot com
  2009-01-09 17:58 ` hjl dot tools at gmail dot com
@ 2009-01-14 15:16 ` hjl dot tools at gmail dot com
  2009-01-14 17:07 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-14 15:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2009-01-14 15:16 -------
An updated patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00738.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
                   |patches/2009-               |patches/2009-
                   |01/msg00463.html            |01/msg00738.html


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2009-01-14 15:16 ` [Bug target/38781] " hjl dot tools at gmail dot com
@ 2009-01-14 17:07 ` hjl dot tools at gmail dot com
  2009-01-15 21:51 ` dcb314 at hotmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-14 17:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2009-01-14 17:07 -------
An updated patch is at

http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00747.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
                   |patches/2009-               |patches/2009-
                   |01/msg00738.html            |01/msg00747.html


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2009-01-14 17:07 ` hjl dot tools at gmail dot com
@ 2009-01-15 21:51 ` dcb314 at hotmail dot com
  2009-03-29 19:34 ` hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2009-01-15 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dcb314 at hotmail dot com  2009-01-15 21:51 -------
(In reply to comment #3)
> An updated patch is at
> 
> http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00747.html

I have a couple of minor questions about the coding style
of this patch.

1. Why is the "/ 8 / 8" a good idea ? 

Presumably "/ 64" doesn't do it right ?

2. On the middle condition of the for-loop, could it
be micro-optimised to compute the upper limit of the
for loop before the loop starts ?

For example, instead of

; (i < A) && (i + pos) < B; ++i

replace with 

const int limit = min( A, B - pos);

...

; i < limit; ++i


Just an idea.


-- 

dcb314 at hotmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2009-01-15 21:51 ` dcb314 at hotmail dot com
@ 2009-03-29 19:34 ` hjl dot tools at gmail dot com
  2009-03-30 14:30 ` hjl at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-29 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2009-03-29 19:33 -------
The updated patch is at

http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01581.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
                URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
                   |patches/2009-               |patches/2009-
                   |01/msg00747.html            |03/msg01581.html


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2009-03-29 19:34 ` hjl dot tools at gmail dot com
@ 2009-03-30 14:30 ` hjl at gcc dot gnu dot org
  2009-03-30 14:34 ` hjl dot tools at gmail dot com
  2009-04-24  5:50 ` lauras at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-03-30 14:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl at gcc dot gnu dot org  2009-03-30 14:29 -------
Subject: Bug 38781

Author: hjl
Date: Mon Mar 30 14:29:10 2009
New Revision: 145292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145292
Log:
2008-03-30  H.J. Lu  <hongjiu.lu@intel.com>

        PR target/38781
        * config/i386/i386.c (classify_argument): Check total size of
        structure.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c


-- 


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2009-03-30 14:30 ` hjl at gcc dot gnu dot org
@ 2009-03-30 14:34 ` hjl dot tools at gmail dot com
  2009-04-24  5:50 ` lauras at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-30 14:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2009-03-30 14:33 -------
Fixed for 4.5.0. No plan to back port.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.4.0                       |4.5.0


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


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

* [Bug target/38781] PR38151: valgrind finds problem
  2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2009-03-30 14:34 ` hjl dot tools at gmail dot com
@ 2009-04-24  5:50 ` lauras at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: lauras at gcc dot gnu dot org @ 2009-04-24  5:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from lauras at gcc dot gnu dot org  2009-04-24 05:50 -------
*** Bug 34865 has been marked as a duplicate of this bug. ***


-- 

lauras at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-04-24  5:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-09  9:53 [Bug c/38781] New: PR38151: valgrind finds problem dcb314 at hotmail dot com
2009-01-09 17:57 ` [Bug c/38781] " hjl dot tools at gmail dot com
2009-01-09 17:58 ` hjl dot tools at gmail dot com
2009-01-14 15:16 ` [Bug target/38781] " hjl dot tools at gmail dot com
2009-01-14 17:07 ` hjl dot tools at gmail dot com
2009-01-15 21:51 ` dcb314 at hotmail dot com
2009-03-29 19:34 ` hjl dot tools at gmail dot com
2009-03-30 14:30 ` hjl at gcc dot gnu dot org
2009-03-30 14:34 ` hjl dot tools at gmail dot com
2009-04-24  5:50 ` lauras at gcc dot gnu dot 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).