Qhimm.com Forums

Project forums => Q-Gears => Topic started by: Aexoden on 2006-06-10 02:08:12

Title: Memory Allocation (Linux abort issue)
Post by: Aexoden on 2006-06-10 02:08:12
There is at least one memory allocation issue that causes massive problems with some versions of glibc on Linux. It likes to detect memory corruption and abort programs immediately. I can somewhat track these things down with valgrind, but both SDL and NVIDIA's drivers like to produce errors of their own, so I'll have to see if I can filter those out or test with software GL, but anyway. (After a quick test, software GL's a good option only if I want to slow my system to a crawl.)

Anyway, in src/utilities/logger.cpp on line 51, you have a delete[] attempting to be executed on a statically allocated RString. This one causes an abort.

Next, in src/utilities/config.cpp on line 59, delete is being used on an array instead of delete[]. Doesn't cause an abort, but valgrind sure didn't like it.

There may be more to look at, but this is just two early things I found.
Title: Re: Memory Allocation (Linux abort issue)
Post by: Akari on 2006-06-10 11:00:02
Quote
Anyway, in src/utilities/logger.cpp on line 51, you have a delete[] attempting to be executed on a statically allocated RString. This one causes an abort.

Next, in src/utilities/config.cpp on line 59, delete is being used on an array instead of delete[]. Doesn't cause an abort, but valgrind sure didn't like it.


Fixed. Thanks a lot.  :-)