All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: [Fwd: stack overflow "cause" found]
Date: Wed, 26 Jul 2006 17:49:15 -0400	[thread overview]
Message-ID: <44C7E35B.6010800@redhat.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D57224A@liverpoolst.ad.cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

Ian Pratt wrote:
>>> Xen really should not be doing this.  We could either uninline some of
>>> these functions, or try gcc -O2 or gcc -Os.
>> OK, with -Os it doesn't quite build due to the built-ins not being
>> inlined.  With -O2 the stack usage changes dramatically...
> 
> It would be nice if -O2 worked. Quite a scary change give the amount of inline asm  though...

Not only does -O2 seem to work, but without it we get stack
overflows and things suddenly stop working.

I've been beating up my x86-64 system with a few VT and paravirt
guests for over an hour now, and it no longer crashes.  Without
-O2, I can make it crash within minutes...

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

[-- Attachment #2: O2 --]
[-- Type: text/plain, Size: 461 bytes --]

--- xen/Rules.mk.noop	2006-07-26 17:44:02.000000000 -0400
+++ xen/Rules.mk	2006-07-26 17:44:16.000000000 -0400
@@ -52,7 +52,7 @@
 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 
-CFLAGS-y               += -g -D__XEN__
+CFLAGS-y               += -g -D__XEN__ -O2
 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
 CFLAGS-$(verbose)      += -DVERBOSE
 CFLAGS-$(crash_debug)  += -DCRASH_DEBUG

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2006-07-26 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 21:46 [Fwd: stack overflow "cause" found] Ian Pratt
2006-07-26 21:49 ` Rik van Riel [this message]
2006-07-27  9:20   ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2006-07-26 22:29 Nakajima, Jun
2006-07-26 19:50 Rik van Riel
2006-07-26 20:49 ` Rik van Riel

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=44C7E35B.6010800@redhat.com \
    --to=riel@redhat.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.