Bug 268019 - clang Assertion failed on devel/libdispatch
Summary: clang Assertion failed on devel/libdispatch
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-27 19:17 UTC by Charlie Li
Modified: 2024-02-17 02:19 UTC (History)
2 users (show)

See Also:


Attachments
allocator.sh (7.57 KB, application/x-shellscript)
2022-11-27 19:17 UTC, Charlie Li
no flags Details
apply.sh (7.54 KB, application/x-shellscript)
2022-11-27 19:18 UTC, Charlie Li
no flags Details
benchmark.sh (7.57 KB, application/x-shellscript)
2022-11-27 19:18 UTC, Charlie Li
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2022-11-27 19:17:47 UTC
Created attachment 238376 [details]
allocator.sh

Assertion failed: (isDeclRep((TST) TypeSpecType) || TypeSpecType == TST_typename), function getTypeSpecTypeNameLoc, file /usr/src/contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h, line 519.

Same fallout on every -CURRENT box: https://portsfallout.com/fallout?port=devel%2Flibdispatch%24

Source files are too large to attach, but are available unmodified in https://github.com/apple/swift-corelibs-libdispatch/tree/swift-5.5-RELEASE/src corresponding to the reproducer scripts
Comment 1 Charlie Li freebsd_committer freebsd_triage 2022-11-27 19:18:18 UTC
Created attachment 238377 [details]
apply.sh
Comment 2 Charlie Li freebsd_committer freebsd_triage 2022-11-27 19:18:44 UTC
Created attachment 238378 [details]
benchmark.sh
Comment 3 Charlie Li freebsd_committer freebsd_triage 2022-11-27 20:34:06 UTC
As a data point, builds successfully with devel/llvm15, so probably a good sign for when LLVM 15 makes it into base.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2022-11-27 21:44:24 UTC
(In reply to Charlie Li from comment #3)
More likely because the port has assertions disabled, so they are never hit. :)

Can you upload the preprocessed files somewhere? It's not always trivial to reproduce the exact build environment, which is why clang writes these.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2022-11-27 21:53:35 UTC
https://people.freebsd.org/~vishwin/libdispatch/

The assertion (~12 years unchanged according to git-blame(1)) does not appear to hit in the previous -STABLEs (and cut -RELEASEs) either, as they have/use older LLVM.
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2022-11-27 22:05:44 UTC
(In reply to Charlie Li from comment #5)
Same there, stable branches have assertions disabled. :)
Comment 7 Jan Beich freebsd_committer freebsd_triage 2023-01-14 14:29:29 UTC
(In reply to Dimitry Andric from comment #4)
> More likely because the port has assertions disabled, so they are never hit. :)

I have bug 265425 applied and can't reproduce. My src.conf(5) doesn't contain WITHOUT_LLVM_ASSERTIONS but this is "low trust" claim as I don't know how to check whether clang binary has assertions enabled. Unfortunately, bug 265425 comment 7 logs *predate* the port revival in ports b9662312dff8.