Status: New
Owner: ----
New issue 2638 by [email protected]: V8 Segmentation fault
http://code.google.com/p/v8/issues/detail?id=2638
I have C++ program,like this:
using namespace v8;
namespace {
void FatalErrorCallback_r(const char* location, const char* message) {
Locker lock;
LOG(ERROR) << "location:" << location << " message:" << message;
return;
}
}
int main(int argv, char *argc[]) {
HandleScope handle_scope;
Handle<ObjectTemplate> global = ObjectTemplate::New();
Handle<Context> context = Context::New(NULL, global);
Context::Scope context_scope(context);
V8::SetFatalErrorHandler(FatalErrorCallback_r);
V8::IgnoreOutOfMemoryException();
string content;
if (!file::File::ReadFileToString("/home/jingwuzhang/writejs.js",
&content)) {
LOG(INFO) << "cann't open file";
return 0;
}
Handle<String> source = String::New(content.c_str());
Handle<Script> script = Script::Compile(source);
script->Run();
(Persistent<Context>(context)).Dispose();
exit(0);
}
the javascript file is attached.this is a "out of memory" script.
I have used the funcs "SetFatalErrorHandler"
and "IgnoreOutOfMemoryException" , and catch the
fatal "location:CALL_AND_RETRY_0 message:Allocation failed - process out of
memory". Even so , my program also get the " Segmentation fault" problem.
How can I fix this problem?
Attachments:
writejs.js 1.7 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.