Hi guys,

I have a trouble while trying to initialize v8::Context on x64 machine ( 
under i32 works fine though ).
I use latest commits from master, trunk, 3.25 branches. All of them have 
the same issue. 
Built v8 with gyp and "make x64.debug library=shared"
My OS is Ubuntu 13.04 x64. Before I had 13.10 and also tried v8  under it 
and got the same result.

Cpp file in attachment. 
gdb`s backtrace:































*(gdb) rStarting program: /home/denis/workspace/project/build/exewarning: 
no loadable sections found in added symbol-file system-supplied DSO at 
0x7ffff7ffa000[Thread debugging using libthread_db enabled]Using host 
libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".[New Thread 
0x7ffff4c25700 (LWP 7082)][New Thread 0x7ffff7ff7700 (LWP 7083)][New Thread 
0x7ffff7fd7700 (LWP 7084)][New Thread 0x7ffff7fc6700 (LWP 7085)][New Thread 
0x7ffff7fb5700 (LWP 7086)]Program received signal SIGSEGV, Segmentation 
fault.0x00007ffff735b1da in v8::internal::Heap::gc_state (this=0x1) at 
../src/heap.h:15081508      inline HeapState gc_state() { return gc_state_; 
}(gdb) bt#0  0x00007ffff735b1da in v8::internal::Heap::gc_state (this=0x1) 
at ../src/heap.h:1508#1  0x00007ffff7504a15 in 
v8::internal::IncrementalMarking::Step (this=0x607fa0, 
allocated_bytes=1197936, 
action=v8::internal::IncrementalMarking::GC_VIA_STACK_GUARD)    at 
../src/incremental-marking.cc:874#2  0x00007ffff75049f0 in 
v8::internal::IncrementalMarking::OldSpaceStep (this=0x607fa0, 
allocated=399312) at ../src/incremental-marking.cc:867#3  
0x00007ffff76eb7c0 in v8::internal::FreeList::Allocate (this=0x631580, 
size_in_bytes=399312) at ../src/spaces.cc:2390#4  0x00007ffff73c9559 in 
v8::internal::PagedSpace::AllocateRaw (this=0x631490, size_in_bytes=399312) 
at ../src/spaces-inl.h:290#5  0x00007ffff7437b3e in 
v8::internal::Heap::ReserveSpace (this=0x605050, sizes=0x7fffffffdc88, 
locations_out=0x7fffffffdc48) at ../src/heap.cc:954#6  0x00007ffff76d72e4 
in v8::internal::Deserializer::Deserialize (this=0x7fffffffdc30, 
isolate=0x605030) at ../src/serialize.cc:802#7  0x00007ffff7516de4 in 
v8::internal::Isolate::Init (this=0x605030, des=0x7fffffffdc30) at 
../src/isolate.cc:2020#8  0x00007ffff771d136 in 
v8::internal::V8::Initialize (des=0x7fffffffdc30) at ../src/v8.cc:89#9  
0x00007ffff76de23f in v8::internal::Snapshot::Initialize 
(snapshot_file=0x0) at ../src/snapshot-common.cc:112#10 0x00007ffff72c201d 
in v8::InitializeHelper (isolate=0x605030) at ../src/api.cc:231#11 
0x00007ffff72c2067 in v8::EnsureInitializedForIsolate (isolate=0x605030, 
location=0x7ffff77fa34c "v8::Context::New()") at ../src/api.cc:241#12 
0x00007ffff72d6489 in v8::Context::New (external_isolate=0x605030, 
extensions=0x0, global_template=..., global_object=...) at 
../src/api.cc:5195#13 0x000000000040237b in main (argc=1, 
argv=0x7fffffffe018) at /home/denis/workspace/project/src/main.cpp:18(gdb)*

Does anybody have the same issue?

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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/d/optout.
#include "../libs/v8/src/v8.h"
#include "../libs/v8/src/serialize.h"
//#include <v8.h>
#include <assert.h>
#include <iostream>

using namespace v8;

int main( int argc, char* argv[])
{
	v8::V8::InitializeICU();
	v8::Isolate* isolate = v8::Isolate::GetCurrent();
	HandleScope handle_scope( isolate );
	Handle<Context> context = Context::New( isolate );	// Dives into this call

	/* This code is not reachable */
	Context::Scope context_scope( context ) ;

	Handle<String> scriptCode = String::NewFromUtf8( isolate,
			"function foo() { return 42; }" );
	Handle<String> fooName = String::NewFromUtf8( isolate, "foo");
	Script::Compile( scriptCode )->Run();
	Local<Function> fun = Local<Function>::Cast(
			context->Global()->Get( fooName ));

	int argsNum = 0;
	Handle<Value> args[] = {};
	Handle<Value> result = fun->Call(fun, argsNum, args);
	std::cout << result->ToInteger()->Value() << std::endl;

	return 0;
}

Reply via email to