Author Topic: Memory Allocation (Linux abort issue)  (Read 3162 times)

Aexoden

  • Guest
Memory Allocation (Linux abort issue)
« 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.
« Last Edit: 2006-06-10 02:15:40 by Aexoden »

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Memory Allocation (Linux abort issue)
« Reply #1 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.  :-)