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

Clang crashes when used with capabilities and source annotations. #327

Closed
kwitaszczyk opened this issue Jun 5, 2019 · 1 comment
Closed

Comments

@kwitaszczyk
Copy link
Member

In case of the hybrid ABI, Clang crashes when an annotated field from a structure referenced by a capability is accessed or assigned a value. The following program can be used to reproduce the problem:

void
test(void)
{
        struct {
                __attribute__((annotate("myannotation"))) int u;
        } var, * __capability x;

        x = &var;
        x->u = x->u;
}

Removing the annotation, using a pointer instead of the capability or removing the assignment results in a correctly compiled program. All three conditions must be satisfied to cause the crash. The above program correctly compiles with the pure-capability ABI.

An example output with a crash backtrace can be found here: https://gist.github.com/kwitaszczyk/68e4faeaeb6a8780c729e1c91d17d914 .

@kwitaszczyk
Copy link
Member Author

@arichardson Thank you! I can continue my work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant