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

llvm crash - segfault during template argument deduction #80613

Closed
eddieavd opened this issue Feb 4, 2024 · 4 comments
Closed

llvm crash - segfault during template argument deduction #80613

eddieavd opened this issue Feb 4, 2024 · 4 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@eddieavd
Copy link

eddieavd commented Feb 4, 2024

llvm crashes for the following reduced code:

class a {
  using size_type = long;
  template < typename Self > void at( this Self&&, size_type );
};
template < typename > class b : a{};
template < typename T = int > class d : b< T > {
  using some_type = T;

  some_type f = at( f );
};
d i e

if some_type does not depend on T, llvm reports use of underclared identifier 'at', no crash

full preprocessed input
reproducing compile command

compiler explorer 1, compiler explorer 2

@eddieavd eddieavd changed the title llvm crash - segfault during member init or function definition instantiation llvm crash - segfault during template argument deduction Feb 4, 2024
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" crash Prefer [crash-on-valid] or [crash-on-invalid] and removed new issue labels Feb 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (eddieavd)

llvm crashes for the following reduced code:
class a {
  using size_type = long;
  template &lt; typename Self &gt; void at( this Self&amp;&amp;, size_type );
};
template &lt; typename &gt; class b : a{};
template &lt; typename T = int &gt; class d : b&lt; T &gt; {
  using some_type = T;

  some_type f = at( f );
};
d i e

if some_type does not depend on T, llvm reports use of underclared identifier 'at', no crash

full preprocessed input
reproducing compile command

compiler explorer 1, compiler explorer 2

@shafik
Copy link
Collaborator

shafik commented Feb 5, 2024

Looks similar to: #69838

CC @cor3ntin

@shafik shafik added the confirmed Verified by a second party label Feb 5, 2024
@MagentaTreehouse
Copy link
Contributor

@shafik Looks like it's no longer crashing.

@shafik
Copy link
Collaborator

shafik commented Mar 19, 2025

@shafik Looks like it's no longer crashing.

It looks like it was fixed in clang-20

@shafik shafik closed this as completed Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

5 participants