Skip to content

Extractor exiting with code 4: assertion failed at: "decls.c", line 18401 in add_src_seq_end_of_variable_if_needed #20636

@intrigus-lgtm

Description

@intrigus-lgtm

We tried to build a CodeQL DB for https://github.com/category-labs/monad/.
Unfortunately the DB is missing many important files.

This is because the extractor chokes ("catastrophic error") on the bits/alloc_traits.h header file of libstdc++ 15.
The problem appears to be related to macros?

(I will create additional issues for non-catastrophic errors that are also in the build-tracer.log: #20640)

Minimized reproducer

struct __allocator_traits_base {
  template < typename >
  static constexpr int __can_construct_at{
# 1
  };
};
Error log extract
[E 23:52:43 2164329] Finished compilation TRAP /tmp/tmp.NzaonYxdn4/trap/cpp/compilations/33/52125401_0.trap.zst
CodeQL C++ extractor: Current location: minimal.cpp:5,4
CodeQL C++ extractor: Current physical location: minimal.cpp:5,4
"minimal.cpp", line 1: internal error: assertion failed at: "decls.c", line 18401 in add_src_seq_end_of_variable_if_needed

    };
     ^

[E 23:52:43 2164329] Warning[extractor-c++]: In construct_text_message: "minimal.cpp", line 1: internal error: assertion failed at: "decls.c", line 18401 in add_src_seq_end_of_variable_if_needed

    };
     ^


1 catastrophic error detected in the compilation of "minimal.cpp".

build-tracer-cut.log

"Original" reproducer

#include <bits/alloc_traits.h>

OS information

  • CodeQL v2.23.2
  • Ubuntu 25:04
  • libstdc++-15
  • clang-19

Please let me know if you need anything else!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions