Author Topic: malloc error  (Read 7274 times)

carlygao

  • Jr. Member
  • **
  • Posts: 37
malloc error
« on: August 31, 2022, 11:10:47 PM »
Hi,

I have no problem to run FEAP85 until last week. After a power failure, whenever I run FEAP85, it gave the following error. I compiled the code again, but the same error. The input file has no problem, because I used it successfully before.

Another weird thing is that I have to set the environment variable for FEAPHOME8_5 whenever I restart the iMac. Otherwise it will complain it can't find makefile.in.

Thanks.

bash-3.2$ ../feap -iIelem_3d_Gxy
feap(2333,0x7fff7a2ad000) malloc: *** error for object 0x7fbe805004f8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0xd5b2f8ff2
#1  0xd5b2f8310
#2  0x7fff90bee529
Abort trap: 6

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: malloc error
« Reply #1 on: September 01, 2022, 12:12:34 PM »
The fact that you have to set FEAPHOME8_5 each time is strange.  First the environment variable is only used during the build process.  If you are repeatedly compiling then it needs to always be set.  I usually put it in my .bashrc file.

The memory error you are seeing is indicative of a memory overwrite someplace.  I would suggest running FEAP with valgrind to see if the problem is a FEAP problem or related to your power failure.

If you are able to post the input file, we can try and test it on our machines.