Skip to content

C/C++: extractor exit code 3 #22330

Description

@hello123leo

clang++ version: 17.0.6
codeql version: 2.26.2

repro.cpp

struct S {
  operator unsigned long long() const;
  S(int) = delete;                       // deleted converting constructor
};

bool operator==(unsigned long long lhs, const S &rhs)
    __attribute__((enable_if(lhs == 0, "literal is safe")));

bool trigger(S s) {
  return s == 0;
}

command:

codeql database create db \
    --language=cpp \
    --source-root=. \
    --command='clang++ -std=c++17 -fsyntax-only repro.cpp'

build-tracer.log:

[E 08:16:24 3866661] CODEQL_EXTRACTOR_CPP_TRAP_CACHING is not set
[E 08:16:24 3866661] CODEQL_EXTRACTOR_CPP_OPTION_TRAP_CACHE_WRITE is not set
[E 08:16:24 3866661] CODEQL_EXTRACTOR_CPP_OPTION_TRAP_CACHE_DIR is not set
[E 08:16:24 3866661] Initialising TRAP cache at path: e4/eb18/18d3fc78486465bd318c72f9c45b
[E 08:16:24 3866661] Not using TRAP cache
[E 08:16:24 3866661] TRAP cache miss
[E 08:16:24 3866661] Starting compilation TRAP /tmp/codeql-s-repro/db/trap/cpp/compilations/39/25630124_0.trap.zst
[E 08:16:24 3866661] Archiving /tmp/codeql-s-repro/db/src/tmp/codeql-s-repro/repro.cpp
"repro.cpp", line 10: error: function "S::S(int)" (declared at line 3) cannot be referenced -- it is a deleted function
    return s == 0;
                 ^

[E 08:16:24 3866661] Warning[extractor-c++]: In construct_text_message: "repro.cpp", line 10: error: function "S::S(int)" (declared at line 3) cannot be referenced -- it is a deleted function
    return s == 0;
                 ^


"repro.cpp", line 10: error: function "S::S(int)" (declared at line 3) cannot be referenced -- it is a deleted function
    return s == 0;
                 ^

[E 08:16:24 3866661] Warning[extractor-c++]: In construct_text_message: "repro.cpp", line 10: error: function "S::S(int)" (declared at line 3) cannot be referenced -- it is a deleted function
    return s == 0;
                 ^


[E 08:16:24 3866661] Creating trap tarball /tmp/codeql-s-repro/db/trap/cpp/tarballs/tmp/codeql-s-repro/repro.cpp.65bef835_0.trap.tar.zst
[E 08:16:24 3866661] Emitting trap files for repro.cpp
[E 08:16:24 3866661] Opening existencedb in /tmp/codeql-s-repro/db/working/existencedb/db
[E 08:16:24 3866661] Warning[extractor-c++]: In canonicalise_path: fs::canonical failed on repro.o (No such file or directory)
[E 08:16:24 3866661] Wrote 2 files to /tmp/codeql-s-repro/db/trap/cpp/tarballs/tmp/codeql-s-repro/repro.cpp.65bef835_0.trap.tar.zst
2 errors detected in the compilation of "repro.cpp".
[E 08:16:24 3866661] Finished compilation TRAP /tmp/codeql-s-repro/db/trap/cpp/compilations/39/25630124_0.trap.zst
[E 08:16:24 3866661] Marking C compilation as happened.
[E 08:16:24 3866661] Setting tag c-compilation-happened
[E 08:16:24 3866661] Starting from CODEQL_TRACER_DB_ID 00000000003B0021_0000000000000003
[E 08:16:24 3866661] Locking DB /tmp/codeql-s-repro/db/working/tags.db
[E 08:16:24 3866661] Locked DB /tmp/codeql-s-repro/db/working/tags.db
[E 08:16:24 3866661] Set tag for 00000000003B0021_0000000000000003
[E 08:16:24 3866661] Set tag for 00000000003B0021_0000000000000002
[E 08:16:24 3866661] Set tag for root
[E 08:16:24 3866661] Unlocking DB
[E 08:16:24 3866661] Unlocked DB
[E 08:16:24 3866661] Warning[extractor-c++]: In main: Extractor exiting with code 3
[T 08:16:24 3866657] Extractor /tmp/codeql-2.26.2/codeql/cpp/tools/linux64/extractor terminated with exit code 3.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions