Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catastrophic error ("internal error: assertion failed at: "decls.c", line 21165 in mark_decl_after_first_in_comma_list") when compiling a CodeQL database from Chromium #16783

Open
flowerhack opened this issue Jun 18, 2024 · 2 comments
Labels
C++ question Further information is requested

Comments

@flowerhack
Copy link

flowerhack commented Jun 18, 2024

Hi hello,

I'm a committer for the Chromium project & we've been experimenting with building CodeQL databases of Chromium.

This bug is similar to the one I previously reported (in that it's a "catastrophic error" that occurs when building a CodeQL database of Chromium), but it seems to have a different root cause, and thus, I'm filing this bug + the reproducer for it separately.

Additionally, I think this bug might be a duplicate of this bug which was reported by someone else, which was left open with a request for a reproducing test case, which I happily provide here.

The Bug

Warning[extractor-c++]: In construct_text_message: "../../base/functional/function_ref.h", line 69: internal error: assertion failed at: "decls.c", line 21165 in mark_decl_after_first_in_comma_list

        std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
                                                                  ^

Reproducing The Bug

I have created a standalone file which can be used to reproduce this bug, which is attached here as importer_list_ii.cc.txt (please remove the .txt extension; this was to make the Github attachment uploader happy).

Reproduction steps (assumes that importer_list_ii.cc is in /YOUR/ROOT/HERE; assumes Clang 19; assumes Linux):

(1) codeql database init --language=cpp --source-root=/YOUR/ROOT/HERE/SOME-EMPTY-SOURCE-DIR /YOUR/ROOT/HERE/repro-failure --overwrite

(2) codeql database trace-command /YOUR/ROOT/HERE/repro-failure --working-dir=/YOUR/ROOT/HERE -- clang -Wno-constant-conversion -Wno-shorten-64-to-32 -Wenum-compare-conditional '-Wno-c++11-narrowing-const-reference' -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare '-std=c++20' -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti '-nostdinc++' --sysroot=../../build/linux/debian_bullseye_amd64-sysroot -fvisibility-inlines-hidden -c ~/importer_list_ii.cc -o ~/importer_list.o

(3) codeql database finalize -j=-1 /YOUR/ROOT/HERE/repro-failure

At the conclusion of these steps there should be logs in build-tracer.log and logs/extractor indicating the failure.

In addition to (1) importer_list_ii.cc (the reproducer file), please find attached (2) the build-tracer.log and (3) the relevant extractor logfile (8f379.log) from running this on my own machine, which will hopefully be useful for debugging/triage.

I do have the logs for the entire Chromium build available upon request, but as you might imagine, those files are very large and may not be as useful to you as this standalone reproducer.

A fix for this bug (or, guidance on how we might be holding it wrong!) would be extremely helpful for us here in Chromium. Please let me know if you need any more information. Thank you!

importer_list_ii.cc.txt
build-tracer.log
8f379.log

@jketema
Copy link
Contributor

jketema commented Jun 19, 2024

Hi @flowerhack ,

As with the other issue, thanks for the report and the reproducer. I've filed an internal issue for this, and hopefully we can get to this fairly soon.

@jketema
Copy link
Contributor

jketema commented Jun 20, 2024

Reported to our frontend provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants