Running the following code with address sanitizer:

    google::protobuf::DynamicMessageFactory* dynamic_message_factory = new 
google::protobuf::DynamicMessageFactory;
    delete dynamic_message_factory;

Causes the sanitizer to complain about new-delete type mismatch:

==26==ERROR: AddressSanitizer: new-delete-type-mismatch on 0xffff9661d9a0 
in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   88 bytes;
  size of the deallocated type: 64 bytes.
    #0 0xffff9c8b6100 in operator delete(void*, unsigned long) 
../../../../src/libsanitizer/asan/asan_new_delete.cpp:164
    #1 0xaaab09291a48 in 
google::protobuf::DynamicMessageFactory::~DynamicMessageFactory() 
(/project/test+0x202c1a48)

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" 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/protobuf/a2075a00-d547-4116-ab60-035e7cceefe5n%40googlegroups.com.

Reply via email to