⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248337 in webkit


Ignore:
Timestamp:
Aug 6, 2019, 7:48:07 PM (7 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] sampling-profiler can see garbage Wasm::Callee* pointer which is HashTable deleted / empty values
https://bugs.webkit.org/show_bug.cgi?id=200494

Reviewed by Saam Barati.

The sampling-profiler can see a garbage pointer which is like Wasm::Callee*. This can be filtered by HashSet<Callee*>.
But this is safe only when the garbage pointer is not deleted / empty values. We saw occasional crash with JetStream2/tsf-wasm.
This patch filters out these values with HashSet<Callee*>::isValidValue.

  • wasm/WasmCalleeRegistry.h:

(JSC::Wasm::CalleeRegistry::isValidCallee):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r248327 r248337  
     12019-08-06  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] sampling-profiler can see garbage Wasm::Callee* pointer which is HashTable deleted / empty values
     4        https://bugs.webkit.org/show_bug.cgi?id=200494
     5
     6        Reviewed by Saam Barati.
     7
     8        The sampling-profiler can see a garbage pointer which is like Wasm::Callee*. This can be filtered by HashSet<Callee*>.
     9        But this is safe only when the garbage pointer is not deleted / empty values. We saw occasional crash with JetStream2/tsf-wasm.
     10        This patch filters out these values with `HashSet<Callee*>::isValidValue`.
     11
     12        * wasm/WasmCalleeRegistry.h:
     13        (JSC::Wasm::CalleeRegistry::isValidCallee):
     14
    1152019-08-06  Commit Queue  <commit-queue@webkit.org>
    216
  • trunk/Source/JavaScriptCore/wasm/WasmCalleeRegistry.h

    r248187 r248337  
    6363    bool isValidCallee(const AbstractLocker&, Callee* callee)
    6464    {
     65        if (!HashSet<Callee*>::isValidValue(callee))
     66            return false;
    6567        return m_calleeSet.contains(callee);
    6668    }
Note: See TracChangeset for help on using the changeset viewer.