Getting strange readings with valgrind
Posted: Wed Mar 01, 2017 6:02 am
Hi! I have just recently started to program with Irrlicht, and I'm not yet very used to it. I'm programming on Linux-based os (Debian), and recently decided to run one of my programs with valgrinds memcheck tool. Valgrind spit out a huge ammount of different errors like this:
The huge ammount of errors soon resulted in the message:
==2311== More than 10000000 total errors detected. I'm not reporting any more.
==2311== Final error counts will be inaccurate. Go fix your program!
What is interesting is that despite the errors, my program seems to run just fine. I have also downloaded the tutorial example sources from the Irrlicht website and compiled them with the provided makefiles. I tested the tutorial binaries with valgrind also, and got the same errors with most of them. So the problem probably isn't in my code. I suspect that there's something wrong with my setup. Any ideas on how I could fix this? In theory I could live with these errors, since myprograms are usually running just fine, but these errors make it quite hard to debug the programs.
EDIT:
The errors are referring to fglrx_dri.so. I have an AMD based GPU, and the fglrx_dri.so seems to have something to do with the AMD drivers. I still have no idea how to fix this problem, though.
EDIT 2:
The problem doesn't occur if using software rendering. Also, intrestingly I can run the first tutorial with openGL rendering without any errors, while most of the other tutorial programs do produce the errors.
Code: Select all
==2311== Invalid write of size 1
==2311== at 0x8D9D5FF: ??? (in /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so)
==2311== by 0x1E0B97BF1F: ???
==2311== by 0xB087F3F: ???
==2311== Address 0x7ffaec5e6e2e is not stack'd, malloc'd or (recently) free'd
==2311==
==2311== Invalid write of size 4
==2311== at 0x8E080F6: ??? (in /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so)
==2311== by 0x1010000: ???
==2311== Address 0x7ffaec62c9e0 is not stack'd, malloc'd or (recently) free'd
==2311==
==2311== Invalid write of size 8
==2311== at 0x8E080D7: ??? (in /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so)
==2311== by 0x1010000: ???
==2311== Address 0x7ffaec62c9e4 is not stack'd, malloc'd or (recently) free'd
==2311== More than 10000000 total errors detected. I'm not reporting any more.
==2311== Final error counts will be inaccurate. Go fix your program!
What is interesting is that despite the errors, my program seems to run just fine. I have also downloaded the tutorial example sources from the Irrlicht website and compiled them with the provided makefiles. I tested the tutorial binaries with valgrind also, and got the same errors with most of them. So the problem probably isn't in my code. I suspect that there's something wrong with my setup. Any ideas on how I could fix this? In theory I could live with these errors, since myprograms are usually running just fine, but these errors make it quite hard to debug the programs.
EDIT:
The errors are referring to fglrx_dri.so. I have an AMD based GPU, and the fglrx_dri.so seems to have something to do with the AMD drivers. I still have no idea how to fix this problem, though.
EDIT 2:
The problem doesn't occur if using software rendering. Also, intrestingly I can run the first tutorial with openGL rendering without any errors, while most of the other tutorial programs do produce the errors.