Bug 264280 - llvm crash while compiling webkit
Summary: llvm crash while compiling webkit
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL: https://github.com/llvm/llvm-project/...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-27 10:07 UTC by Baptiste Daroussin
Modified: 2022-05-31 16:02 UTC (History)
1 user (show)

See Also:
dim: mfc-stable13+
dim: mfc-stable12+


Attachments
the sh file generated by clang (6.84 KB, text/plain)
2022-05-27 10:07 UTC, Baptiste Daroussin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Daroussin freebsd_committer freebsd_triage 2022-05-27 10:07:38 UTC
Created attachment 234259 [details]
the sh file generated by clang

llvm crashes on current llvmorg-14.0.3-0-g1f9140064dfb (it also crashed with llvmorg-13.0.0-0-gd7b669b3a303)
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2022-05-27 10:11:46 UTC
the cpp file link is on freefall https://people.freebsd.org/~bapt/SpecializationConstant-889ba7.cpp (too big for here)
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-05-27 17:45:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=eca6e0f7e460bf9a4a6e1bd5198d75168280c88e

commit eca6e0f7e460bf9a4a6e1bd5198d75168280c88e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-05-27 17:43:39 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-05-27 17:44:06 +0000

    Apply clang fix for assertion failure building webkit2-gtk

    Merge commit 30baa5d2a450 from llvm git (by Richard Smith):

      PR45879: Fix assert when constant evaluating union assignment.

      Consider the form of the first operand of a class assignment not the
      second operand when implicitly starting the lifetimes of union members.
      Also add a missing check that the assignment call actually came from a
      syntactic assignment, not from a direct call to `operator=`.

    PR:             264280
    Reported by:    bapt
    MFC after:      3 days

 contrib/llvm-project/clang/lib/AST/ExprConstant.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-30 18:31:15 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=34c1a831bb1f2bfbbf1b2d343c1e653e5df1d96a

commit 34c1a831bb1f2bfbbf1b2d343c1e653e5df1d96a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-05-27 17:43:39 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-05-30 18:28:33 +0000

    Apply clang fix for assertion failure building webkit2-gtk

    Merge commit 30baa5d2a450 from llvm git (by Richard Smith):

      PR45879: Fix assert when constant evaluating union assignment.

      Consider the form of the first operand of a class assignment not the
      second operand when implicitly starting the lifetimes of union members.
      Also add a missing check that the assignment call actually came from a
      syntactic assignment, not from a direct call to `operator=`.

    PR:             264280
    Reported by:    bapt
    MFC after:      3 days

    (cherry picked from commit eca6e0f7e460bf9a4a6e1bd5198d75168280c88e)

 contrib/llvm-project/clang/lib/AST/ExprConstant.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-05-31 15:56:46 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=42e66f29f5b24297366c60ea5d0c6e3537dd2f21

commit 42e66f29f5b24297366c60ea5d0c6e3537dd2f21
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-05-27 17:43:39 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-05-31 13:16:40 +0000

    Apply clang fix for assertion failure building webkit2-gtk

    Merge commit 30baa5d2a450 from llvm git (by Richard Smith):

      PR45879: Fix assert when constant evaluating union assignment.

      Consider the form of the first operand of a class assignment not the
      second operand when implicitly starting the lifetimes of union members.
      Also add a missing check that the assignment call actually came from a
      syntactic assignment, not from a direct call to `operator=`.

    PR:             264280
    Reported by:    bapt
    MFC after:      3 days

    (cherry picked from commit eca6e0f7e460bf9a4a6e1bd5198d75168280c88e)

 contrib/llvm-project/clang/lib/AST/ExprConstant.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)