https://bugs.kde.org/show_bug.cgi?id=433857

--- Comment #3 from Paul Floyd <pjfl...@wanadoo.fr> ---
ASAN example

Here ASAN is assuming use of new delete expressions whilst I was making raw
calls to the operators.

paulf> ./new_delete_mismatch_size.asan
=================================================================
==1505==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x603000000040 in
thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   32 bytes;
  size of the deallocated type: 33 bytes.
    #0 0x2b9452 in operator delete(void*, unsigned long)
/usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3
    #1 0x2bb021 in main
/usr/home/paulf/scratch/valgrind/memcheck/tests/new_delete_mismatch_size.cpp:18:5
    #2 0x23613f in _start /usr/src/lib/csu/amd64/crt1_c.c:75:7
    #3 0x8002e0007  (<unknown module>)

So far I have

==7503== Mismatched new/delete with size 33 
==7503==    at 0x484F133: operator delete(void*, unsigned long)
(vg_replace_malloc.c:1036)
==7503==    by 0x201AF1: main (new_delete_mismatch_size.cpp:18)
==7503==  Address 0x55b4040 is 0 bytes inside a block of size 32 alloc'd
==7503==    at 0x484D0D4: operator new(unsigned long) (vg_replace_malloc.c:487)
==7503==    by 0x201AE0: main (new_delete_mismatch_size.cpp:17)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to