glibc detected - error

This is a discussion on glibc detected - error within the C Programming forums, part of the General Programming Boards category; Hi, I have written a client/server app that works fine when I run both in a local machine, but once ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    glibc detected - error

    Hi,

    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 ***
    Aborted


    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.

    Thanks!

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    looks like memory overrun in the block allocated by malloc
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    cas
    cas is offline
    Registered User
    Join Date
    Sep 2007
    Posts
    978
    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, 03: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, 09:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21