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

[fuzz] Assertion `Access == AS_private || Access == AS_protected' failed. #22211

Closed
llvmbot opened this issue Dec 10, 2014 · 8 comments
Closed
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 10, 2014

Bugzilla Link 21837
Resolution FIXED
Resolved on Feb 21, 2019 14:10
Version trunk
OS Linux
Blocks #23431
Attachments test case
Reporter LLVM Bugzilla Contributor
CC @majnemer,@nico,@rnk

Extended Description

Fuzzing discovered that the attached test case, when given as input to

clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm

causes this assertion failure:

clang-3.6: tools/clang/lib/Sema/SemaAccess.cpp:737: AccessResult HasAccess(clang::Sema &, const (anonymous namespace)::EffectiveContext &, const clang::CXXRecordDecl *, clang::AccessSpecifier, const (anonymous namespace)::AccessTarget &): Assertion `Access == AS_private || Access == AS_protected' failed.

@majnemer
Copy link
Mannequin

majnemer mannequin commented Dec 17, 2014

reasonable test case:
struct B {
template <struct U : U { } > void f();
};

@nico
Copy link
Contributor

nico commented Dec 30, 2014

*** Bug llvm/llvm-bugzilla-archive#22055 has been marked as a duplicate of this bug. ***

@nico
Copy link
Contributor

nico commented Dec 30, 2014

Slightly different test case:

struct A {
template <class B {}, B> void f() {}
};

@rnk
Copy link
Collaborator

rnk commented Dec 11, 2015

Another one:

template struct U;
struct A {
enum { X = U<struct B{}>::val, Y = sizeof(B) };
};

All of these test cases define a struct that gets an access specifier of AS_none, but the struct ends up hanging out in a RecordDecl, confusing access control.

@rnk
Copy link
Collaborator

rnk commented Feb 21, 2019

None of these examples crash anymore.

@nico
Copy link
Contributor

nico commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#22055

@kcc
Copy link
Contributor

kcc commented Nov 26, 2021

mentioned in issue #23431

@GabrielRavier
Copy link
Contributor

mentioned in issue llvm/llvm-bugzilla-archive#37355

@kcc kcc mentioned this issue Mar 28, 2015
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

5 participants