Status: New
Owner: ----

New issue 2266 by [email protected]: Segmentation fault on Ubuntu 11.10
http://code.google.com/p/v8/issues/detail?id=2266

Simple helloworld program also causing segmentation fault.

#include <v8.h>

using namespace v8;

int main(int argc, char *argv[]) {
        HandleScope handle_scope;
        Persistent<Context> context = Context::New();
        Context::Scope context_scope(context);
        Handle<String> source = String::New("xyz();");
        TryCatch trycatch;
        Handle<Script> script = Script::Compile(source);
        Handle<Value> result = script->Run();
        if (result.IsEmpty()) {
                fprintf(stderr, "Exception: %s\n",
                                *String::AsciiValue(trycatch.Exception()));
                return -1;
        }
        String::AsciiValue ascii(result);
        printf("%s\n", *ascii);
        context.Dispose();

        return 0;
}

If I remove TryCatch then there is no segmentation fault.

OS: Ubuntu 11.10 64-bit
g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to