Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v8: work around String::WriteAscii segfault

See http://code.google.com/p/v8/issues/detail?id=2493 for details.

This commit reapplies 9668df8. The issue has been fixed upstream but
reappeared after last night's downgrade to V8 3.14.5 in commit b15a10e.

Conflicts:
	test/simple/test-buffer.js
  • Loading branch information...
commit 3c2c08e9b88faf71fc25843c81466b10cbb7d044 1 parent aa98539
@bnoordhuis authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  deps/v8/src/v8utils.h
View
2  deps/v8/src/v8utils.h
@@ -209,6 +209,8 @@ INLINE(void CopyChars(sinkchar* dest, const sourcechar* src, int chars));
template <typename sourcechar, typename sinkchar>
void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
+ ASSERT(chars >= 0);
+ if (chars == 0) return;
sinkchar* limit = dest + chars;
#ifdef V8_HOST_CAN_READ_UNALIGNED
if (sizeof(*dest) == sizeof(*src)) {
Please sign in to comment.
Something went wrong with that request. Please try again.