Revision: 18753
Author: [email protected]
Date: Wed Jan 22 13:59:05 2014 UTC
Log: Fix invalid memory access when initializing the command line in d8
BUG=none
[email protected]
LOG=n
Review URL: https://codereview.chromium.org/143983012
http://code.google.com/p/v8/source/detail?r=18753
Modified:
/branches/bleeding_edge/src/d8.cc
=======================================
--- /branches/bleeding_edge/src/d8.cc Fri Jan 10 12:07:29 2014 UTC
+++ /branches/bleeding_edge/src/d8.cc Wed Jan 22 13:59:05 2014 UTC
@@ -1564,13 +1564,14 @@
#ifdef V8_SHARED
static void SetStandaloneFlagsViaCommandLine() {
- int fake_argc = 2;
- char **fake_argv = new char*[2];
+ int fake_argc = 3;
+ char **fake_argv = new char*[3];
fake_argv[0] = NULL;
fake_argv[1] = strdup("--trace-hydrogen-file=hydrogen.cfg");
fake_argv[2] = strdup("--redirect-code-traces-to=code.asm");
v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
free(fake_argv[1]);
+ free(fake_argv[2]);
delete[] fake_argv;
}
#endif
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.