Bug 265751 - clang crashes on science/py-tweedledum on i386, amd64 on 14
Summary: clang crashes on science/py-tweedledum on i386, amd64 on 14
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: http://beefy17.nyi.freebsd.org/data/m...
Keywords:
Depends on:
Blocks: 265723
  Show dependency treegraph
 
Reported: 2022-08-10 05:13 UTC by Yuri Victorovich
Modified: 2023-06-18 19:02 UTC (History)
4 users (show)

See Also:


Attachments
unbreak it temporarily on 14 (888 bytes, text/plain)
2023-06-18 12:55 UTC, Wen Heping
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-08-10 05:13:05 UTC

    
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2022-08-10 07:58:14 UTC
Can somebody fish out the /tmp/synthesis-6b2a40.cpp and /tmp/synthesis-6b2a40.sh files, and attach them here?
Comment 3 Mark Millard 2022-08-11 06:42:00 UTC
(In reply to Dimitry Andric from comment #2)

Fishing here appears to mean doing one's own build, likely with -w
involved. (So far as I know, the evidence is not present on the build
server after the builder is cleaned out for its next potential use
or for its overall deletion.)

That still requires causing the *.cpp and *.sh files
to be put someplace that -w makes a copy of.

Past examples have been generated via using the likes of:

CFLAGS+=   -fcrash-diagnostics-dir=.
CPPFLAGS+= -fcrash-diagnostics-dir=.

and then finding where the files are in the (expanded?) tar
archive materials.

This error has an amd64 failure context available and so should
be buildable by a wide variety of folks.

(My environment will soon be without power for a time.)
Comment 4 John F. Carr 2022-08-16 19:25:29 UTC
The test case produced by llvm is too large to upload here, 1.6 MB with xz -9.  It's not clear to me how to reduce it.  The source code that causes the crash is near the end of the file.

The error is:

Assertion failed: (!VD->mightBeUsableInConstantExpressions(Info.Ctx)), function evaluateVarDeclInit, file /data/Cilk/opencilk-project/clang/lib/AST/ExprConstant.cpp, line 3314.

It happens trying to generate code for

                auto& [u_j, v_j] = device_.edge(j);

in SatSwap::symmetry_break.  clang is confused about whether a value depends on template arguments.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2022-08-16 19:27:03 UTC
(In reply to John F. Carr from comment #4)

You can e-mail it to me and I would upload it to FreeBSD's ftp.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2022-08-16 19:46:20 UTC
Test case from John F. Carr: https://people.freebsd.org/~yuri/testcase-for-bug265751.txz
Comment 7 Wen Heping freebsd_committer freebsd_triage 2023-06-18 12:55:04 UTC
Created attachment 242864 [details]
unbreak it temporarily on 14

unbreak it temporarily on 14
Comment 8 Dimitry Andric freebsd_committer freebsd_triage 2023-06-18 14:38:23 UTC
This is <https://github.com/llvm/llvm-project/issues/53598>; unfortunately the problem exists for quite a while, since clang 11 approximately. It looks like either an overzealous assert, or something subtle is really off.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2023-06-18 19:02:11 UTC
This patch was committed earlier in 64002cb040cb383b84d26d3ee0bdb93962995b16

Thank you for the patch!