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

Precompiling <iostream> and then using std::cout makes executable segfault #8064

Closed
llvmbot opened this issue Jul 22, 2010 · 2 comments
Closed
Labels
bugzilla Issues migrated from bugzilla c++

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 22, 2010

Bugzilla Link 7692
Resolution FIXED
Resolved on Jul 27, 2010 07:58
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @akyrtzi,@DougGregor

Extended Description

I have t.hpp containing:

#include

which I compile into a PCH with:

clang -cc1 t.hpp -emit-pch -o t.hpp.pch

Next, I have t.cpp containing:

int main() { std::cout << 'x'; }

and I compile it with:

clang -cc1 -include-pch t.hpp.pch -S t.cpp -o t.s
clang++ t.s -o t

No errors or warnings of any kind so far.

But now when I run ./t, it segfaults. :-(

I'm using clang r109129 on an x86_64 machine running Linux 2.6.34.

@DougGregor
Copy link
Contributor

C++ precompiled headers are not yet fully implemented.

@akyrtzi
Copy link
Contributor

akyrtzi commented Jul 27, 2010

Fixed at r109501. Thank you very much for the report!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 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 c++
Projects
None yet
Development

No branches or pull requests

3 participants