Skip to content

test/embedding/embedtest.cc fails to compile on modern llvm (at least llvm21.1.8) #63807

@bugsbeastie

Description

@bugsbeastie

Version

package name: node24-24.16.0

Platform

FreeBSD mint07 16.0-CURRENT FreeBSD 16.0-CURRENT #0: Fri Jun  5 06:16:05 CEST 2026     root@mint07:/usr/obj/usr/local/poudriere/jails/16amd64/usr/src/amd64.amd64/sys/GENERIC amd64

FreeBSD 16-CURRENT 1600018 g22c1f5d0ec21 n286382

FreeBSD clang version 21.1.8 (https://github.com/llvm/llvm-project.git llvmorg-21.1.8-0-g2078da43e25a)
Target: x86_64-unknown-freebsd16.0
Thread model: posix
InstalledDir: /usr/bin
Build config: +assertions

Subsystem

embedtest (probably?)

What steps will reproduce the bug?

I think, the error is present in many versions of node, but I have personally encountered it trying to build node24-24.16.0 with llvm21.1.8

How often does it reproduce? Is there a required condition?

The build always fails.

What is the expected behavior? Why is that the expected behavior?

node compiles successfully.

What do you see instead?

The actual error message is:

../test/embedding/embedtest.cc:138:12: error: no viable conversion from 'node::EmbedderSnapshotData::Pointer' (aka 'unique_ptr<const EmbedderSnapshotData, DeleteSnapshotData>') to 'bool'
  138 |     assert(snapshot);
      |            ^~~~~~~~
/usr/include/c++/v1/__memory/unique_ptr.h:276:64: note: explicit conversion function is not a candidate
  276 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
      |                                                                ^

Additional information

The link to FreeBSD Problem Report

The link to full build log with environment, dependency libraries used, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions