19d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// Copyright 2009 the V8 project authors. All rights reserved. 29d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// Redistribution and use in source and binary forms, with or without 39d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// modification, are permitted provided that the following conditions are 49d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// met: 59d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// 69d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// * Redistributions of source code must retain the above copyright 79d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// notice, this list of conditions and the following disclaimer. 89d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// * Redistributions in binary form must reproduce the above 99d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// copyright notice, this list of conditions and the following 109d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// disclaimer in the documentation and/or other materials provided 119d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// with the distribution. 129d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// * Neither the name of Google Inc. nor the names of its 139d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// contributors may be used to endorse or promote products derived 149d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// from this software without specific prior written permission. 159d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// 169d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 179d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 189d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 199d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 209d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 219d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 229d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 239d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 249d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 259d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 269d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 279d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com 28c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org// See http://code.google.com/p/chromium/issues/detail?id=27227 29c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org// Regression test for stack corruption issue. 30c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org 31c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.orgfunction top() { 32c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org function g(a, b) {} 33c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org function t() { 34c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org for (var i=0; i<1; ++i) { 35c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org g(32768, g()); 36c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org } 37c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org } 38c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org t(); 39c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org} 40c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.orgtop(); 41