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

Executor causes segmentation fault #1127

Closed
hkaiser opened this issue May 6, 2014 · 1 comment
Closed

Executor causes segmentation fault #1127

hkaiser opened this issue May 6, 2014 · 1 comment

Comments

@hkaiser
Copy link
Member

hkaiser commented May 6, 2014

This code causes a segfault:

#include <iostream>
#include <hpx/hpx_main.hpp>
#include <hpx/hpx_init.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/thread_executors.hpp>

#include <boost/shared_ptr.hpp>

using hpx::async;
using std::vector;
using hpx::lcos::future;
using std::cout;
using std::endl;
using hpx::threads::executors::local_priority_queue_executor;

class mock_runtime {
    public:
        boost::shared_ptr<local_priority_queue_executor> exec;
};

boost::shared_ptr<mock_runtime> test_runtime;

int hpx_main() {
    vector<hpx::lcos::future<void>> threads;

    test_runtime->exec.reset(new local_priority_queue_executor);
    test_runtime->exec.reset();
    cout << "All done" << endl;
    return hpx::finalize();
}

int main() {
    test_runtime.reset(new mock_runtime);
    hpx::init();
    return 0;
}
@hkaiser hkaiser added this to the 0.9.9 milestone May 6, 2014
@hkaiser hkaiser changed the title executor causes segfault executor causes segmentation fault May 6, 2014
@hkaiser hkaiser self-assigned this May 6, 2014
@hkaiser
Copy link
Member Author

hkaiser commented May 6, 2014

This test works for me (tm)

@hkaiser hkaiser closed this as completed May 6, 2014
@hkaiser hkaiser changed the title executor causes segmentation fault Executor causes segmentation fault May 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant