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

g_allocator static initialization in entry.cpp #1290

Open
glennerichall opened this issue Dec 9, 2017 · 0 comments
Open

g_allocator static initialization in entry.cpp #1290

glennerichall opened this issue Dec 9, 2017 · 0 comments

Comments

@glennerichall
Copy link

IDE: Clion
Building: JoshuaBrookover/bgfx.cmake
OS: OSX High Sierra

Seems that

static Context s_ctx;

will be executed before

bx::AllocatorI* g_allocator = getDefaultAllocator();

creating a BAD_ACCESS (NULL) for _allocator here

https://github.com/bkaradzic/bx/blob/d2bcdc5c0d878bbba59a12ab559f9f1b528920fe/include/bx/inline/allocator.inl#L45

replacing all instances of g_allocator with getDefaultAllocator() in entry.cpp will do the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant