Jump to content
  • 0

64 bit compilation causes memory corruption


Mikado

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   2
  • Joined:  11/08/12
  • Last Seen:  

Compiling my server in a 64 bit environment with ./configure --enable-64bit the compilation goes ok (just a few warnings) but after some of my users enters it, the map disconnects and this message is displayed in the terminal:

 

*** glibc detected *** ./map-server_sql: malloc(): memory corruption: 0x0000000005445f30 ***
*** glibc detected *** ./map-server_sql: malloc(): memory corruption: 0x0000000005445f30 ***
 
In 32 bit OS with a 32bit compilation the server is running perfectly.
 
Coredump doesn't show anything. Is there any way I can check what's the problem?
Edited by Mikado
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   2
  • Joined:  11/08/12
  • Last Seen:  

Nevermind. It was a custom code, corrected with snprintf instead of sprintf.

 

Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Are you running a 32 bit OS or 64 bit?

 

You can't run a 64 bit program on a 32 bit OS.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   2
  • Joined:  11/08/12
  • Last Seen:  

Compiling my server in a 64 bit environment with ./configure --enable-64bit 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  105
  • Reputation:   67
  • Joined:  04/05/13
  • Last Seen:  

Has to be something with your machine, as I build my executables with --enable-64bit and I've never had memory corruption errors. Might want to check with memtest86 or something like that.

 

What OS/distro are you running?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...