Skip to content

[Bug]: buggy std::unique_ptr code from NDK r29-beta3 #2170

Closed

Description

@serge-sans-paille

Description

The following code fails to compile with NDK r29-beta3:

#include <cstdlib>
#include <memory>

typedef void (&FreeSignature)(void*);

std::unique_ptr<int, FreeSignature> a(nullptr, free);

The issue is fixed in LLVM upstream llvmorg-21.1.0-rc1, which is not part of NDK r29-beta3 which only includes libcxx 21.0.0

I've noticed it's not a supported version but I failed to find a decent wait to report rc bugs.

Upstream bug

llvm/llvm-project#142125

Commit to cherry-pick

769c42f4a552a75c8c38870ddc1b50d2ea874e4e

I am using a supported NDK

  • I have checked and the NDK I'm using is currently supported

Affected versions

r28

Host OS

Linux

Host OS version

Fedora 42

Affected ABIs

x86_64

Activity

  1. serge-sans-paille commented on Aug 7, 2025

    @serge-sans-paille
    Author

    For the record, this triggered a Firefox build failure tracked as https://bugzilla.mozilla.org/show_bug.cgi?id=1980684

  2. DanAlbert commented on Aug 7, 2025

    @DanAlbert
    Contributor

    I've noticed it's not a supported version but I failed to find a decent wait to report rc bugs.

    That's my bad. I forgot to add it to the list at some point. Fixed now.

  3. pirama-arumuga-nainar commented on Aug 13, 2025

    @pirama-arumuga-nainar
    Collaborator

    I've cherry-picked the fix internally to the r29 clang branch (and the next clang version slated for r30). Will wait for any additional issues reported for r29 before uploading new prebuilts.

  4. moved this from Unconfirmed to Needs prebuilt update in NDK r29on Aug 18, 2025
  5. moved this to Awaiting triage in LLVMon Sep 2, 2025
  6. moved this from Unconfirmed to Merged in NDK r30on Sep 2, 2025
  7. moved this from Awaiting triage to Prebuilts submitted in LLVMon Sep 2, 2025
  8. moved this from Needs prebuilt update to Needs cherry-pick in NDK r29on Sep 2, 2025
  9. moved this from Needs cherry-pick to Merged in NDK r29on Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

  • Status
    Prebuilts submitted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions