[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-09-11 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Resolution|--- |FIXED Status|REPORTED

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-06-14 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Attachment #158590|0 |1 is obsolete|

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-06-14 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Attachment #157936|0 |1 is obsolete|

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-06-08 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #13 from Paul Floyd --- I need to make sure that I didn't make the same error here as I did with realloc size zero (I suspect so). Will double check and add some tests. -- You are receiving this mail because: You are watching all bug

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-05-01 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #12 from Paul Floyd --- Created attachment 158590 --> https://bugs.kde.org/attachment.cgi?id=158590=edit Big patch for lots of aligned / sized alloc errors Use memcheck.h for internal use user req. Had problems including it previously,

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-21 Thread Sam James
https://bugs.kde.org/show_bug.cgi?id=433859 Sam James changed: What|Removed |Added CC||s...@gentoo.org -- You are receiving this mail

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Attachment #157921|0 |1 is obsolete|

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #11 from Paul Floyd --- Created attachment 157936 --> https://bugs.kde.org/attachment.cgi?id=157936=edit Big patch for lots of aligned / sized alloc errors Last macOS and doc changes -- You are receiving this mail because: You are

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Attachment #157920|0 |1 is obsolete|

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #10 from Paul Floyd --- Created attachment 157921 --> https://bugs.kde.org/attachment.cgi?id=157921=edit Big patch for lots of aligned / sized alloc errors Fixes for macOS -- You are receiving this mail because: You are watching all

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-04-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Attachment #157739|0 |1 is obsolete|

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-31 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #8 from Paul Floyd --- So far I've done basic testing on FreeBSD amd64, FreeBSD x86, Linux glibx amd64, Linux musl amd64 and Illumos. I'll have a go with older Solaris and macOS at a later date. A few todos: Updated the documentation.

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-31 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #7 from Paul Floyd --- Created attachment 157739 --> https://bugs.kde.org/attachment.cgi?id=157739=edit Big patch for lots of aligned / sized alloc errors This also covers https://bugs.kde.org/show_bug.cgi?id=433859

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #6 from Paul Floyd --- The wrappers used for new / delete operators now takes the size and alignment and will generate warnings if they are uninit. The nothrow tag gets ignored - it's only there for overload resolution. -- You are

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #5 from Paul Floyd --- MyClass* myClass = (MyClass *)operator new(sizeof(MyClass), std::align_val_t(67U)); with libstdc++ > 122if (__builtin_expect (!std::__has_single_bit(align), false)) │ │ 123

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-07 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #4 from Paul Floyd --- foo.cpp:5:19: error: requested alignment '67' is not a positive power of 2 5 | class alignas(67) MyClass { | ^~~ A bit of a fight to get the compiler to do the wrong thing. -- You

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-05 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #3 from Paul Floyd --- For libstdc++ look in ibstdc++-v3/libsupc++/new_opa.cc -- You are receiving this mail because: You are watching all bug changes.

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-03-05 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #2 from Paul Floyd --- For the C++ aligned allocators libc++ bumps up the allocation size if it is less than sizeof(void*) and then uses posix_memalign libstdc++ does a popcnt (!!!) to check for power of 2 then calls aligned_alloc

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2023-01-22 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 --- Comment #1 from Paul Floyd --- I also recently noticed that C23 will probably add new versions of free (free_sized and free_aligned_sized but no free_aligned). As I see it, these are both optional and a conforming implementation can just call

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2021-10-14 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Assignee|jsew...@acm.org |pjfl...@wanadoo.fr -- You are receiving this

[valgrind] [Bug 433859] Add mismatched detection to C++ 17 aligned new/delete

2021-03-03 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=433859 Paul Floyd changed: What|Removed |Added Summary|Add mismatched detection to |Add mismatched detection to