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

undefined reference to '__csan_llvm_x86_sse2_pause' #21

Open
wheatman opened this issue Aug 11, 2022 · 2 comments
Open

undefined reference to '__csan_llvm_x86_sse2_pause' #21

wheatman opened this issue Aug 11, 2022 · 2 comments

Comments

@wheatman
Copy link

__csan_llvm_x86_sse2_pause seems to be missing for cilksan
I tried to add the compile flag

-mllvm -cilksan-bc-path=`find ~/opencilkv20/build/bin/clang++ -name "libcilksan.bc"

but that didn't fix it either

Adding the following to the code did work

#ifdef __cilksan__
#ifdef __cplusplus
extern "C" {
#endif
void __csan_default_libhook(uint64_t call_id, uint64_t func_id, unsigned count);
void __csan_llvm_x86_sse2_pause(uint64_t call_id, uint64_t func_id,
                                unsigned count) {
  __csan_default_libhook(call_id, func_id, count);
}
#ifdef __cplusplus
}
#endif
#endif

As requested reporting the missing symbol. Let me know if the source would be helpful

@neboat
Copy link
Contributor

neboat commented Aug 11, 2022

Thanks for the report.

Out of curiosity, concerning the -cilksan-bc-path flag, can you try changing that flag as follows?

-mllvm -cilksan-bc-path=`find ~/opencilkv20/build/ -name "libcilksan.bc"

In particular, remove bin/clang++ from the path given to find. Does it work if you use that modified flag (and don't add the code snippet)?

@wheatman
Copy link
Author

Yes, that did also work

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

2 participants