From: iposva@chromium.org Date: Fri, 17 Apr 2009 00:57:21 +0000 (+0000) Subject: - Fix buffer overflow in the pre-allocated memory thread. X-Git-Tag: upstream/4.7.83~24296 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82ac3f303132a7f46241f349dd69df7a8a865f43;p=platform%2Fupstream%2Fv8.git - Fix buffer overflow in the pre-allocated memory thread. Review URL: http://codereview.chromium.org/67248 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/top.cc b/src/top.cc index 82221c120..3c4b8dd77 100644 --- a/src/top.cc +++ b/src/top.cc @@ -123,8 +123,8 @@ class PreallocatedMemoryThread: public Thread { local_buffer.length()); // Publish the local buffer and signal its availability. - data_ = &local_buffer[0]; - length_ = sizeof(local_buffer); + data_ = local_buffer.start(); + length_ = local_buffer.length(); data_ready_semaphore_->Signal(); while (keep_running_) { diff --git a/test/mjsunit/regexp-multiline-stack-trace.js b/test/mjsunit/regexp-multiline-stack-trace.js index aa2de8875..fc248ef6a 100644 --- a/test/mjsunit/regexp-multiline-stack-trace.js +++ b/test/mjsunit/regexp-multiline-stack-trace.js @@ -25,6 +25,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// The flags below are to test the trace-calls functionality and the +// preallocated meessage memory. // Flags: --trace-calls --preallocate-message-memory /**