Thread: glibc detected - error

  1. #1
    Registered User
    Join Date
    Mar 2009

    glibc detected - error


    I have written a client/server app that works fine when I run both in a local machine, but once I try to run the server on a remote machine I get the following error:

    *** glibc detected *** free(): invalid next size (normal): 0x0804d828 ***

    Anybody have an idea of why this is happening? I've read on several forums that this may be caused by allocating less memory than what is required.


  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    looks like memory overrun in the block allocated by malloc
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #3
    Registered User
    Join Date
    Sep 2007
    You probably wrote outside the bounds of allocated space. It could be because of allocating less memory than required, or it could be a bug where you accidentally access memory you shouldn't be. It sounds like you're likely on a system that is supported by Valgrind, a fantastic debugging tool that can help pinpoint exactly where your memory errors are occurring. I would definitely give it a shot; but don't forget to build your program with the -g flag for debugging.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM