public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/7010: Bug in 3.1 with inline memcpy
@ 2002-06-13  9:26 Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2002-06-13  9:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7010; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Jan Hubicka <jh@suse.cz>
Cc: Martin Kahlert <martin.kahlert@infineon.com>, gcc-patches@gcc.gnu.org,
   aj@suse.de, gcc-gnats@gcc.gnu.org
Subject: Re: c/7010: Bug in 3.1 with inline memcpy
Date: Thu, 13 Jun 2002 09:23:06 -0700

 On Thu, Jun 13, 2002 at 06:05:55PM +0200, Jan Hubicka wrote:
 > 	* i386.c (ix86_expand_movstr):  Fix pasto.
 
 Ok everywhere.
 
 
 r~


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

* Re: c/7010: Bug in 3.1 with inline memcpy
@ 2002-06-20 14:10 gerald
  0 siblings, 0 replies; 5+ messages in thread
From: gerald @ 2002-06-20 14:10 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, martin.kahlert, nobody

Synopsis: Bug in 3.1 with inline memcpy

State-Changed-From-To: open->closed
State-Changed-By: gerald
State-Changed-When: Thu Jun 20 14:08:53 2002
State-Changed-Why:
    According to feedback by originator. Thanks!

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7010


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

* Re: c/7010: Bug in 3.1 with inline memcpy
@ 2002-06-13  9:16 Jakub Jelinek
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2002-06-13  9:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7010; it has been noted by GNATS.

From: Jakub Jelinek <jakub@redhat.com>
To: Jan Hubicka <jh@suse.cz>
Cc: Martin Kahlert <martin.kahlert@infineon.com>, gcc-patches@gcc.gnu.org,
   rth@cygnus.com, aj@suse.de, gcc-gnats@gcc.gnu.org
Subject: Re: c/7010: Bug in 3.1 with inline memcpy
Date: Thu, 13 Jun 2002 12:13:12 -0400

 On Thu, Jun 13, 2002 at 06:05:55PM +0200, Jan Hubicka wrote:
 > > #include <string.h>
 > > 
 > > int main()
 > > {
 > >  char dst[16];
 > >  char src[16];
 > >  int tocopy = 5;
 > > 
 > >  memcpy (dst+5, src, tocopy);
 > > 
 > >  return 0;
 > > }
 > 
 > Oh no, another pasto in my code :(
 > I am just proffreading both functions to catch similar bugs, if they
 > exists.
 > 
 > Bootstrapped/regtested branch, OK for mainline/branch?
 > Ok to add testcase into mainline testsuite?
 
 I think the testcase would be useful on branch too, just
 it shouldn't use string.h but whatever simplified code reproduces this
 (as with string.h it depends on what exact libc you're using etc.).
 
 	Jakub


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

* Re: c/7010: Bug in 3.1 with inline memcpy
@ 2002-06-13  9:06 Jan Hubicka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Hubicka @ 2002-06-13  9:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7010; it has been noted by GNATS.

From: Jan Hubicka <jh@suse.cz>
To: Martin Kahlert <martin.kahlert@infineon.com>,
	gcc-patches@gcc.gnu.org, rth@cygnus.com, aj@suse.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/7010: Bug in 3.1 with inline memcpy
Date: Thu, 13 Jun 2002 18:05:55 +0200

 > #include <string.h>
 > 
 > int main()
 > {
 >  char dst[16];
 >  char src[16];
 >  int tocopy = 5;
 > 
 >  memcpy (dst+5, src, tocopy);
 > 
 >  return 0;
 > }
 
 Oh no, another pasto in my code :(
 I am just proffreading both functions to catch similar bugs, if they
 exists.
 
 Bootstrapped/regtested branch, OK for mainline/branch?
 Ok to add testcase into mainline testsuite?
 
 Thu Jun 13 18:03:55 CEST 2002  Jan Hubicka  <jh@suse.cz>
 	* i386.c (ix86_expand_movstr):  Fix pasto.
 Index: i386.c
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
 retrieving revision 1.423
 diff -c -3 -p -r1.423 i386.c
 *** i386.c	12 Jun 2002 14:51:07 -0000	1.423
 --- i386.c	13 Jun 2002 16:03:44 -0000
 *************** ix86_expand_movstr (dst, src, count_exp,
 *** 9913,9919 ****
         if (count == 0 && align < desired_alignment)
   	{
   	  label = gen_label_rtx ();
 ! 	  emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
   				   LEU, 0, counter_mode, 1, label);
   	}
         if (align <= 1)
 --- 9913,9919 ----
         if (count == 0 && align < desired_alignment)
   	{
   	  label = gen_label_rtx ();
 ! 	  emit_cmp_and_jump_insns (countreg, GEN_INT (desired_alignment - 1),
   				   LEU, 0, counter_mode, 1, label);
   	}
         if (align <= 1)


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

* c/7010: Bug in 3.1 with inline memcpy
@ 2002-06-13  1:16 Martin Kahlert
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Kahlert @ 2002-06-13  1:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7010
>Category:       c
>Synopsis:       Bug in 3.1 with inline memcpy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 01:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Kahlert
>Release:        3.1.1 20020610 (prerelease)
>Organization:
Infineon AG
>Environment:
System: Linux keksy 2.4.18 #9 SMP Thu Mar 14 17:35:28 MET 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-20020610/configure --prefix=/sw/snapshots --enable-languages=f77,c++,java --disable-threads --enable-shared=libstdc++
>Description:
-minline-all-stringops has a problem with memcpy (SegFault).
>How-To-Repeat:
# cat bug.c
#include <string.h>

int main()
{
 char dst[16];
 char src[16];
 int tocopy = 5;

 memcpy (dst+5, src, tocopy);

 return 0;
}

$ gcc -O -minline-all-stringops -o bug bug.c
$ ./bug
>Fix:
Omit -minline-all-stringops from command line.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-06-20 21:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-13  9:26 c/7010: Bug in 3.1 with inline memcpy Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2002-06-20 14:10 gerald
2002-06-13  9:16 Jakub Jelinek
2002-06-13  9:06 Jan Hubicka
2002-06-13  1:16 Martin Kahlert

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