- Fix buffer overflow in the pre-allocated memory thread.
authoriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 17 Apr 2009 00:57:21 +0000 (00:57 +0000)
committeriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 17 Apr 2009 00:57:21 +0000 (00:57 +0000)
Review URL: http://codereview.chromium.org/67248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/top.cc
test/mjsunit/regexp-multiline-stack-trace.js

index 82221c1..3c4b8dd 100644 (file)
@@ -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_) {
index aa2de88..fc248ef 100644 (file)
@@ -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
 
 /**