Much appreciated. This resolved my problem.
On Monday, September 9, 2024 at 3:46:48 AM UTC-4 Ben Noordhuis wrote:

> On Sun, Sep 8, 2024 at 8:22 PM Nikolas Kovacs <kova...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am upgrading the version of v8 I am embedding into my program. I am 
> having an issue that I cannot figure out how to solve. The issue is that, 
> when building in debug mode, the Isolate::Scope object's destructor throws 
> the following exception.
> >
> > ```
> > Exception thrown: read access violation.
> > this was 0x21000000001.
> > ```
> >
> > For reference, I am on Windows 10 and I am using clang-cl and libc++ 
> that is built with v8.
> > The following is my build arguments for building v8 from source
> >
> > ```
> > is_debug = true
> > v8_enable_verify_heap = false
> > v8_enable_single_generation = false
> > v8_enable_shared_ro_heap = true
> > v8_enable_webassembly = true
> > v8_enable_maglev = true
> > v8_enable_turbofan = true
> > v8_enable_debug_code = true
> > v8_enable_debugging_features = true
> > v8_enable_direct_handle = false
> > v8_enable_direct_local = false
> > v8_enable_disassember = true
> > target_cpu = "x64"
> > enable_iterator_debugging = true
> > v8_enable_slow_dchecks = false
> > v8_use_external_startup_data = false
> > v8_enable_sandbox = true
> > v8_enable_pointer_compression = true
> > v8_enable_pointer_compression_shared_cage = true
> > v8_enable_31bit_smis_on_64bit_arch = true
> > ```
> >
> > Below is a reproducible example:
> >
> > ```cpp
> > #include <v8.h>
> > #include <libplatform/libplatform.h>
> > #include <memory>
> >
> > int main() {
> > std::unique_ptr<v8::Platform> platform = 
> v8::platform::NewDefaultPlatform();
> > v8::V8::InitializePlatform(platform.get());
> > v8::V8::Initialize();
> >
> > v8::Isolate::CreateParams create_params;
> > create_params.array_buffer_allocator = 
> v8::ArrayBuffer::Allocator::NewDefaultAllocator();
> > v8::Isolate* isolate = v8::Isolate::New(create_params);
> >
> > {
> > v8::Isolate::Scope isolate_scope{ isolate };
> > v8::HandleScope handle_scope{ isolate };
> > }
> > return 0;
> > }
> > ```
>
> You build V8 with is_debug=true so make sure your own code is also
> compiled with -DV8_ENABLE_CHECKS, otherwise there will be an ABI
> mismatch between your code and V8's.
>
> (I have a todo to create a CL that detects that but I haven't gotten
> around to it yet.)
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/6576ba35-19bf-48c1-9df1-d08a41b7a2b5n%40googlegroups.com.

Reply via email to