Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15184

Clang 3.5 reports error: memset overwrites vtable pointer in s2

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.7
    • Affects Version/s: 2.7.6
    • Component/s: Geo
    • None
    • Fully Compatible
    • ALL

      src/third_party/s2/s2regioncoverer.cc:116:10: error: destination for this 'memset' call is a pointer to class containing a dynamic class
            'S2Cell'; vtable pointer will be overwritten [-Werror,-Wdynamic-class-memaccess]
        memset(candidate, 0, size);
        ~~~~~~ ^
      src/third_party/s2/s2regioncoverer.cc:116:10: note: explicitly cast the pointer to silence this warning
        memset(candidate, 0, size);
               ^
               (void*)
      1 error generated.
      

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: