From owner-p4-projects@FreeBSD.ORG Thu Jan 17 18:18:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C28F16A418; Thu, 17 Jan 2008 18:18:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9711816A46D for ; Thu, 17 Jan 2008 18:18:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A4EB013C448 for ; Thu, 17 Jan 2008 18:18:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0HIIZ76015132 for ; Thu, 17 Jan 2008 18:18:35 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0HIIZnF015129 for perforce@freebsd.org; Thu, 17 Jan 2008 18:18:35 GMT (envelope-from jhb@freebsd.org) Date: Thu, 17 Jan 2008 18:18:35 GMT Message-Id: <200801171818.m0HIIZnF015129@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 133485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2008 18:18:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=133485 Change 133485 by jhb@jhb_mutex on 2008/01/17 18:18:04 Outsmart gcc so that we still exhaust the stack. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#41 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#41 (text+ko) ==== @@ -751,12 +751,25 @@ test_witness_order_funcs); #endif +static int blow_stack(void); + static int +eat_stack(void) +{ + u_int32_t dummy[128]; + + dummy[0] = arc4random(); + dummy[0] += blow_stack(); + return (dummy[0]); +} + +static int blow_stack(void) { - char dummy[512]; + u_int32_t dummy[128]; - dummy[0] += blow_stack(); + dummy[0] = arc4random(); + dummy[0] += eat_stack(); return (dummy[0]); }