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

-fsanitize-blacklist does not work correctly with relative paths #843

Closed
luca020400 opened this issue Sep 10, 2020 · 3 comments · Fixed by #907
Closed

-fsanitize-blacklist does not work correctly with relative paths #843

luca020400 opened this issue Sep 10, 2020 · 3 comments · Fixed by #907
Milestone

Comments

@luca020400
Copy link

luca020400 commented Sep 10, 2020

I'm trying to replace ccache with sccache in the AOSP build system but I'm facing a few errors
This is the first issue that stems from using the -c flag of clang enabling the use of the integrated clang assembler

cat foo.cpp              
#include <stdlib.h>
void bad_foo() {
  int *a = (int*)malloc(40);
  a[10] = 1;
}
int main() { bad_foo(); }
cat blacklist.txt 
# Ignore reports from bad_foo function.
fun:bad_foo
sccache clang++ -c -fsanitize=address -fsanitize-blacklist=blacklist.txt foo.cpp
sccache: encountered fatal error
sccache: error : Failed to open file for hashing: "blacklist.txt"
sccache:  cause: Failed to open file for hashing: "blacklist.txt"
sccache:  cause: No such file or directory (os error 2)

The same command without -c works properly

sccache clang++ -fsanitize=address -fsanitize-blacklist=blacklist.txt foo.cpp
@froydnj
Copy link
Contributor

froydnj commented Sep 10, 2020

Are you attempting to use sccache-dist?

@luca020400
Copy link
Author

I'm using sccache as a local cache, if that's what you're asking

@froydnj froydnj changed the title Sanitize + assembler support -fsanitize-blacklist does not work correctly with relative paths Sep 10, 2020
@froydnj
Copy link
Contributor

froydnj commented Sep 10, 2020

That wasn't, but I think your answer tells me what I need to know. The temporary workaround is to pass an absolute path for -fsanitize-blacklist=.

@glandium glandium added this to the 0.2.14 milestone Dec 11, 2020
glandium added a commit to glandium/sccache that referenced this issue Dec 15, 2020
When the current directory of the sccache process is not the same as
the current directory for the compiler process, extra hash files are
currently not found, leading to errors.

Fixes mozilla#843
glandium added a commit that referenced this issue Dec 16, 2020
When the current directory of the sccache process is not the same as
the current directory for the compiler process, extra hash files are
currently not found, leading to errors.

Fixes #843
Xanewok referenced this issue in paritytech/cachepot Apr 2, 2021
When the current directory of the sccache process is not the same as
the current directory for the compiler process, extra hash files are
currently not found, leading to errors.

Fixes #843
drahnr referenced this issue in paritytech/cachepot Apr 6, 2021
When the current directory of the sccache process is not the same as
the current directory for the compiler process, extra hash files are
currently not found, leading to errors.

Fixes #843
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

Successfully merging a pull request may close this issue.

3 participants