WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Fwd: stack overflow "cause" found]

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Fwd: stack overflow "cause" found]
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Wed, 26 Jul 2006 17:49:15 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 26 Jul 2006 14:49:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D57224A@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Red Hat, Inc
References: <A95E2296287EAD4EB592B5DEEFCE0E9D57224A@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
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
--- 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel