[Webkit-unassigned] [Bug 27843] New: Invalid member function pointer hashing in SVG bindings.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 30 11:26:22 PDT 2009


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

           Summary: Invalid member function pointer hashing in SVG
                    bindings.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: deanm at chromium.org


There is some code to create and reuse SVG wrappers in the binding code. 
Previously it hashed a struct with 1 pointer and 2 member function pointers. 
The problem is member function pointers are opaque, and at least on MSVC cannot
be hashed reliably (and it doesn't make sense to try to read the opaque bytes).

See http://www.codeproject.com/KB/cpp/FastDelegate.aspx for more details on the
implementations.

There are a few options, all of them involve not trying to hash the member
function pointer.  One would be to remove member function pointers all together
and create thunk wrappers.  Another option would be to use something like a
std::map, since the compiler should implement operator<, etc correctly.

The option I took was to add some more hashing material during the binding
generation, so we can hash the pointer and a generated field hash together.  It
would probably be best to remove the use of member function pointers all
together but that is a much bigger task.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list