[Webkit-unassigned] [Bug 241516] New: -Wmismatched-new-delete warning spam from CSSStyleValue.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 10 11:22:42 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=241516

            Bug ID: 241516
           Summary: -Wmismatched-new-delete warning spam from
                    CSSStyleValue.h
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org

Unfortunately since this is a header file, it triggers a massive warning spam that exceeds my terminal scrollback. 
Sadly, I won't notice other compiler warnings until it is fixed:

In destructor ‘virtual WebCore::CSSStyleValue::~CSSStyleValue()’,
    inlined from ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = WebCore::CSSStyleValue]’ at /usr/include/c++/12/bits/unique_ptr.h:95:2,
    inlined from ‘void WTF::RefCounted<T, Deleter>::deref() const [with T = WebCore::CSSStyleValue; Deleter = std::default_delete<WebCore::CSSStyleValue>]’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/RefCounted.h:190:22,
    inlined from ‘void WTF::RefCounted<T, Deleter>::deref() const [with T = WebCore::CSSStyleValue; Deleter = std::default_delete<WebCore::CSSStyleValue>]’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/RefCounted.h:187:10,
    inlined from ‘WTF::Ref<T, <template-parameter-1-2> >::~Ref() [with T = WebCore::CSSUnitValue; Traits = WTF::RawPtrTraits<WebCore::CSSUnitValue>]’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/Ref.h:61:23,
    inlined from ‘JSC::EncodedJSValue WebCore::jsDOMCSSNamespaceConstructorFunction_chBody(JSC::JSGlobalObject*, JSC::CallFrame*)’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/DerivedSources/JSDOMCSSNamespace.cpp:1015:5,
    inlined from ‘static JSC::EncodedJSValue WebCore::IDLOperation<JSClass>::callStatic(JSC::JSGlobalObject&, JSC::CallFrame&, const char*) [with JSC::EncodedJSValue (* operation)(JSC::JSGlobalObject*, JSC::CallFrame*) = WebCore::jsDOMCSSNamespaceConstructorFunction_chBody; WebCore::CastedThisErrorBehavior shouldThrow = WebCore::CastedThisErrorBehavior::Throw; JSClass = WebCore::JSDOMCSSNamespace]’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/bindings/js/JSDOMOperation.h:70:25,
    inlined from ‘JSC::EncodedJSValue WebCore::jsDOMCSSNamespaceConstructorFunction_ch(JSC::JSGlobalObject*, JSC::CallFrame*)’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/DerivedSources/JSDOMCSSNamespace.cpp:1020:100:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/css/typedom/CSSStyleValue.h:113:13: warning: ‘static void WebCore::CSSStyleValue::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
  113 |     virtual ~CSSStyleValue() = default;
      |             ^
In static member function ‘static WTF::Ref<WebCore::CSSUnitValue> WebCore::CSSUnitValue::create(double, WebCore::CSSUnitType)’,
    inlined from ‘static WTF::Ref<WebCore::CSSUnitValue> WebCore::CSSNumericFactory::ch(double)’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/css/typedom/CSSNumericFactory.h:54:104,
    inlined from ‘JSC::EncodedJSValue WebCore::jsDOMCSSNamespaceConstructorFunction_chBody(JSC::JSGlobalObject*, JSC::CallFrame*)’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/DerivedSources/JSDOMCSSNamespace.cpp:1015:5,
    inlined from ‘static JSC::EncodedJSValue WebCore::IDLOperation<JSClass>::callStatic(JSC::JSGlobalObject&, JSC::CallFrame&, const char*) [with JSC::EncodedJSValue (* operation)(JSC::JSGlobalObject*, JSC::CallFrame*) = WebCore::jsDOMCSSNamespaceConstructorFunction_chBody; WebCore::CastedThisErrorBehavior shouldThrow = WebCore::CastedThisErrorBehavior::Throw; JSClass = WebCore::JSDOMCSSNamespace]’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/bindings/js/JSDOMOperation.h:70:25,
    inlined from ‘JSC::EncodedJSValue WebCore::jsDOMCSSNamespaceConstructorFunction_ch(JSC::JSGlobalObject*, JSC::CallFrame*)’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/DerivedSources/JSDOMCSSNamespace.cpp:1020:100:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/css/typedom/CSSUnitValue.h:43:116: note: returned from ‘static void* WebCore::CSSUnitValue::operator new(size_t)’
   43 |     static Ref<CSSUnitValue> create(double value, CSSUnitType unit) { return adoptRef(*new CSSUnitValue(value, unit)); }
      |                                                                                                                    ^

I'm frustrated that I do not see the problem. I think it must be somehow related to the WTF_MAKE_ISO_ALLOCATED, but I'm bamboozled as to what exactly is wrong. I wouldn't be surprised if GCC is just totally confused.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220610/37d3c50b/attachment-0001.htm>


More information about the webkit-unassigned mailing list