Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Memory corruption (undefined behaviour) after updating from 0.9.5.x -> 0.9.6.x #303

Closed
therocode opened this issue Jan 17, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@therocode
Copy link

I am not entirely sure if this is a bug in GLM or not, but I am not sure what else, so apologies if it turns out not to be.

I have been using glm in my game that's been developed for over a year and it has been working fine with no errors printed in valgrind or anything such. Today, after updating glm from 0.9.5.x to 0.9.6.x I started to get a peculiar error in my game. All entities spawn in one place, and whenever I touch the ground the game crashes with an invalid read of memory.
The specifics around the error probably doesn't say much but valgrind just says that there is an invalid read on an object that is suddenly random memory.

If I check out older versions of my game (even several months back) the exact error persists even though it was never apparent before.

Using git, I bisected the glm source code and was able to find the exact commit after which I start to experience these issues. However I am not initiated in the glm source code so I cannot tell if it does anything that could be related to it.

Last good commit: a2a6037 - (2 months ago) More std trivial experiments #263
First bad commit: 838bdee - (10 weeks ago) All vec types are copyable #263
Diff: http://dpaste.com/1X55MGZ

I tried a few times switching between these commits and it is definitely the triggering factor for my error symptoms.

To me this sounds like either a bug in GLM, or a really really well-hidden bug in my code which only surfaced with this particular commit.

What do you think, is it possible that the commit contain actual problems? Are there more ways that I can provide useful information on the issue?

Oh, and my compiler is clang 3.5.1 on linux.

@therocode
Copy link
Author

I now tried with g++ 4.9.2 and the result is the same.

@Groovounet Groovounet added the bug label Feb 14, 2015
@Groovounet Groovounet added this to the GLM 0.9.6 milestone Feb 14, 2015
@Groovounet Groovounet self-assigned this Feb 14, 2015
@Groovounet
Copy link
Member

I couldn't figure out what was the exact issue so I just added a copy constructor and assignment operator of the exact same type which should match the last good commit.

This fix has been done on GLM 0.9.6 branch for GLM 0.9.6.2 release.

Thanks for contributing,
Christophe

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

No branches or pull requests

2 participants