public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kcook at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/15551] [3.4/3.5? Regression] -mtune=pentium4  -O2 with sjlj EH breaks stack probe worker on windows32  targets
Date: Mon, 07 Jun 2004 20:01:00 -0000	[thread overview]
Message-ID: <20040607200100.30313.qmail@sourceware.org> (raw)
In-Reply-To: <20040520075803.15551.dannysmith@users.sourceforge.net>


------- Additional Comments From kcook at gcc dot gnu dot org  2004-06-07 20:00 -------
Created an attachment (id=6488)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6488&action=view)
A potential more correct fix

After deciphering the twisty passages.	I think this is a more correct fix. 
The problem was not really a scheduling problem, it was that the Win32 alloca
routine was marking that it clobbered memory, so gcc felt free to move stuff
above the call to __alloca.

I still need to regtest it (as that is REALLY slow on cygwin), but it survived
a c,c++ bootstrap on i686-pc-cygwin and fixed the bug (writing to unalloca
memory) as evidenced by below:

$ diff -u pm-gcc_35_orig.s pm-p4new.s
--- pm-gcc_35_orig.s	2004-06-01 14:25:47.170950500 -0400
+++ pm-p4new.s	2004-06-07 15:26:04.193903000 -0400
@@ -23,26 +23,26 @@
	movl	%esp, %ebp
	pushl	%edi
	pushl	%esi
-	movl	$___gxx_personality_sj0, -20052(%ebp)
-	movl	$LLSDA1422, -20048(%ebp)
	pushl	%ebx
-	movl	$L4, -20040(%ebp)
	call	__alloca
	movl	$16, %eax
	andl	$-16, %esp
	call	__alloca
	leal	-24(%ebp), %eax
+	movl	$___gxx_personality_sj0, -20052(%ebp)
	movl	%eax, -20044(%ebp)
	leal	-20076(%ebp), %eax
-	movl	%esp, -20036(%ebp)
+	movl	$LLSDA1422, -20048(%ebp)
	movl	%eax, (%esp)
+	movl	$L4, -20040(%ebp)
+	movl	%esp, -20036(%ebp)
	call	__Unwind_SjLj_Register
	call	___main
	movl	$256, (%esp)
	movl	$-1, -20072(%ebp)
	call	__Znwj
-	movl	%eax, -20080(%ebp)
	movl	$16, 8(%esp)
+	movl	%eax, -20080(%ebp)
	movl	$LC0, 4(%esp)
	movl	%eax, (%esp)
	movl	$1, -20072(%ebp)

This patch was against mainline, OK if it passes a complete regtest?

The patch also applies to 3.4 and I'll also regtest it there.
Mark, OK for 3.4.1 assuming that passes?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |kcook at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


  parent reply	other threads:[~2004-06-07 20:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-21 11:45 [Bug target/15551] New: " dannysmith at users dot sourceforge dot net
2004-05-21 12:36 ` [Bug target/15551] [3.4/3.5? Regression] " pinskia at gcc dot gnu dot org
2004-05-29 22:47 ` mmitchel at gcc dot gnu dot org
2004-06-01 20:44 ` kcook at gcc dot gnu dot org
2004-06-07 20:01 ` kcook at gcc dot gnu dot org [this message]
2004-06-10 12:47 ` kcook at gcc dot gnu dot org
2004-06-10 13:43 ` mmitchel at gcc dot gnu dot org
2004-06-15 17:42 ` me at cgf dot cx
2004-06-19 17:47 ` mmitchel at gcc dot gnu dot org
2004-06-19 19:18 ` rth at gcc dot gnu dot org
2004-06-21 18:38 ` rth at gcc dot gnu dot org
2004-06-21 21:26 ` mmitchel at gcc dot gnu dot org
2004-06-21 22:52 ` cvs-commit at gcc dot gnu dot org
2004-06-22 21:47 ` cvs-commit at gcc dot gnu dot org
2004-06-22 22:16 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040607200100.30313.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).