Opened 3 years ago

Last modified 2 years ago

#64055 closed defect

legacysupport @1.0.4: Add support for missing "operator delete ( void* ptr, std::size_t sz )" in macos < 10.12 — at Version 3

Reported by: tenzap Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: legacysupport

Description (last modified by tenzap)

Originally, when building KeePassXC on macOS 10.11 with a compiler that supports the -fsized-deallocation (like clang++-mp-9.0, or a recent AppleClang, probably >= 8) there is this error:

error: call to unavailable function 'operator delete': introduced in macOS 10.12

Test case file to compile with -fsized-deallocation flag:

#include <new>
int main() {
  void * ptr = nullptr;
  std::size_t size = 1;
  ::operator delete(ptr, size);
}

Maybe this is part of the things that could be addressed by to legacysupport?

There may be other related functions missing since delete is 'overloaded' https://en.cppreference.com/w/cpp/memory/new/operator_delete https://en.cppreference.com/w/cpp/header/new

For now this is worked around in KeePassXC with a patch that disables use of -fsized-deallocation on macos < 10.12.

Change History (3)

comment:1 Changed 3 years ago by tenzap

Description: modified (diff)

comment:2 in reply to:  description Changed 3 years ago by tenzap

Last edited 3 years ago by tenzap (previous) (diff)

comment:3 Changed 3 years ago by tenzap

Description: modified (diff)
Note: See TracTickets for help on using tickets.