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

rbd: fix static initialization ordering issues #6978

Merged
merged 1 commit into from Dec 18, 2015

Conversation

trociny
Copy link
Contributor

@trociny trociny commented Dec 18, 2015

The order in which static objects in different compilation units are
initialized is undefined. Use static functions as a workaround.

Signed-off-by: Mykola Golub mgolub@mirantis.com

The order in which static objects in different compilation units are
initialized is undefined. Use static functions as a workaround.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
@trociny
Copy link
Contributor Author

trociny commented Dec 18, 2015

@dillaman I stepped on it when building rbd with clang under FreeBSD: actions had been initialized before Shell::s_actions was initialized, and it crashed.

@dillaman dillaman changed the title rbd: fix "static initialization order fiasco" rbd: fix static initialization ordering issues Dec 18, 2015
@dillaman dillaman self-assigned this Dec 18, 2015
dillaman pushed a commit that referenced this pull request Dec 18, 2015
rbd: fix static initialization ordering issues

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman merged commit 28081d7 into ceph:master Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants