On Wed, Oct 19, 2022 at 11:55 PM Adam Klein <[email protected]> wrote:

> On Tue, Oct 18, 2022 at 9:28 PM ClearScript Developers <
> [email protected]> wrote:
>
>> Hmm, we implemented your suggestion and so far have NOT encountered any
>> issues on 10.7. We had definitely tried the same thing on 10.6 and
>> encountered crashes, but we may have misinterpreted our results.
>>
>> Interestingly, there does appear to be code
>> <https://github.com/v8/v8/blob/28f763b5949d053c62e95db2f997a9f13b2e3065/src/heap/cppgc/sweeper.cc#L462>
>> that dereferences the return value without checking for nullptr, but it
>> could be a red herring.
>>
>
> That's in cppgc code, which in my understanding isn't directly used by V8
> (in Chromium it implements the garbage collector used for objects on the 
> Oilpan
> heap
> <https://chromium.googlesource.com/v8/v8/+/main/include/cppgc/README.md>).
>

It's used from V8 as well but in that case it relies on V8's platform and
would get the default allocator in case none is provided.

If it's used stand-alone (PDFium) then the requirement is that the page
allocator is always provided through the platform. What's missing is a
fallback path for this case, feel free to file a bug.


>
>
>> In any case, since we can't repro any crashes at the moment, please feel
>> free to ignore this question. Sorry about that!
>>
>> BTW, the change you linked reads "All embedders override this method now,
>> so it can be abstract." Question: To whom does "all embedders" refer? :)
>>
>
> I suspect this was shorthand for "chromium, node, and d8" which are the
> ones tested in our CI. Please don't take any offense, we know there are
> many more embedders than those :)
>
> But thanks for raising this thread, some documentation on that method is a
> good idea.
>
>
>> On Tuesday, October 18, 2022 at 6:36:13 PM UTC-4 [email protected]
>> wrote:
>>
>>> From git blame, it looks like this change was simply meant as a cleanup
>>> in https://chromium-review.googlesource.com/c/v8/v8/+/3780538, where
>>> the previous default implementation simply returned nullptr. So at first
>>> glance it looks like having your platform return nullptr ought to work.
>>> Adding the CL author & reviewer to this thread for confirmation.
>>>
>>> On Sat, Oct 15, 2022 at 6:54 AM ClearScript Developers <
>>> [email protected]> wrote:
>>>
>>>> We got no response to this on the v8-users group, so we thought we'd
>>>> try here.
>>>>
>>>> "Our embedder has a custom v8::Platform implementation. In V8 10.6+,
>>>> v8::Platform::GetPageAllocator is abstract, and no information is provided
>>>> about how to implement it.
>>>>
>>>> We're currently delegating GetPageAllocator to an instance of the
>>>> default platform (created via v8::platform::NewDefaultPlatform). That seems
>>>> to work but feels hacky. Before this we never had any reason to instantiate
>>>> the default platform.
>>>>
>>>> Is this an oversight? Most v8::Platform methods are relatively mundane
>>>> – task scheduling, raw memory allocation, etc. – whereas v8::PageAllocator
>>>> is quite esoteric, and many embedders would probably not know how to
>>>> implement it."
>>>>
>>>> Since that original post, we've run into a problem with the default
>>>> platform (a deadlock at process shutdown on Windows 7 if the default
>>>> platform is owned by a static object), so we're now patching V8 to expose
>>>> v8::base::PageAllocator instead.
>>>>
>>>> Any comments or recommendations from the V8 team?
>>>>
>>>> --
>>>> --
>>>> 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].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/v8-dev/b5bf5bce-37ca-4cbf-bc1c-81d0f259e74en%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/v8-dev/b5bf5bce-37ca-4cbf-bc1c-81d0f259e74en%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> --
>> 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/v8-dev/079ea899-db7c-4534-a7fb-51b984744b19n%40googlegroups.com
>> <https://groups.google.com/d/msgid/v8-dev/079ea899-db7c-4534-a7fb-51b984744b19n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/CAEvLGcJyJgiwUrxzkfO57X58ikw_27KB6%3DYia-p1kX%3D%2BOUMqiw%40mail.gmail.com
> <https://groups.google.com/d/msgid/v8-dev/CAEvLGcJyJgiwUrxzkfO57X58ikw_27KB6%3DYia-p1kX%3D%2BOUMqiw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAH%2BmL5CTft-Dvjyd637GXez70sLLMHwwtjfYvCQXJO0uMxbaGQ%40mail.gmail.com.

Reply via email to