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

Using std::bind with std::function leads to stack overflow #16759

Closed
llvmbot opened this issue Jun 20, 2013 · 6 comments
Closed

Using std::bind with std::function leads to stack overflow #16759

llvmbot opened this issue Jun 20, 2013 · 6 comments
Labels
bugzilla Issues migrated from bugzilla libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 20, 2013

Bugzilla Link 16385
Resolution FIXED
Resolved on Dec 19, 2013 10:24
Version 3.2
OS Linux
Attachments a.cpp
Reporter LLVM Bugzilla Contributor

Extended Description

I'm using the 3.3 sources from the following page: http://llvm.org/releases/download.html#3.3

If the first parameter to a std::bind is a std::function, the code does not work. The stack shows up to 63k recursive calls to:
std::__1__function<float (float, float)>::function<std::__1::__bind<std::__1::function<float (float, float)>&, float, float > > ()

How to compile:
clang++ -std=c++11 -stdlib=libc++ -lcxxrt -ldl a.cpp

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 1, 2013

Committed revision 185297.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 1, 2013

Thank you very much!

Keep up the good work :)

@zygoloid
Copy link
Mannequin

zygoloid mannequin commented Oct 5, 2013

*** Bug llvm/llvm-bugzilla-archive#17468 has been marked as a duplicate of this bug. ***

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 19, 2013

*** Bug llvm/llvm-bugzilla-archive#18282 has been marked as a duplicate of this bug. ***

@zygoloid
Copy link
Mannequin

zygoloid mannequin commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#17468

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#18282

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 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 libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

No branches or pull requests

1 participant