-
Notifications
You must be signed in to change notification settings - Fork 746
stylo's build script crashes inside mangling with "(signal: 11, SIGSEGV: invalid memory reference)" on macOS #462
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
Comments
@emilio Could you have a look at this? This is probably not really a bindgen bug... It could be a bug in libclang. I have no idea how can we workaround it. |
The issue here is that it somehow doesn't treat
|
Actually this issue is reproducible with the following code: template <class... Args>
struct Test {
static constexpr bool x[] = {Args::x...};
}; |
Thanks for the testcase! I'll find a workaround ASAP. (For the record, Xidorn debugged it and it's a bug in LLVM, I think he submitted a patch?) |
It is not necessarily a bug in clang. There is no way in clang itself to hit that condition, and it seems libclang doesn't have no-crashing guarantee for invalid input. I tried hard to write a test for that issue last night, but failed, so I'm not going to submit a patch for it. |
See bug 1335302.
After adding
"--stdlib=libc++", "--target=x86_64-apple-darwin"
to clang args inbuild_gecko.rs
, the bindgen does not report any compile error anymore, but it crashes with the stack I pasted in bug 1335302 comment 3.I saw #439, and also tested upgrading to clang-sys 0.14.0, but it doesn't seem to help. The build script still crashes at the same location.
It seems to crash when trying to get mangling name of
__find_exactly_one_checked::__matches
at /usr/local/Cellar/llvm/3.9.0/include/c++/v1/tuple:1018:25. But I failed to find minimal reproducible code...The text was updated successfully, but these errors were encountered: