Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7609571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:12:15+00:00 2026-05-31T01:12:15+00:00

My Linux 3.0 / glibc 2.13 application is stopping with an error of the

  • 0

My Linux 3.0 / glibc 2.13 application is stopping with an error of the following form:

*** glibc detected *** MYAPP: double free or corruption (fasttop): 0x000000000164fef0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x78a96)[0x7f9b114d4a96]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f9b114d8d7c]
MYAPP(...+0x131)[0x44e4c1]
MYAPP(...+0x3e8)[0x4441d8]
MYAPP(...+0x61)[0x440e41]

My question is not about the bug that caused this.

My question is by what “corruption detection” feature is glibc halting my process? How does it work? Where is this corruption detection feature documented? What tunable parameters does it have and how are they accessed at link-time and/or run-time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:12:16+00:00Added an answer on May 31, 2026 at 1:12 am

    This has a security bent to it, but is very content rich.
    http://www.blackhat.com/presentations/bh-usa-07/Ferguson/Whitepaper/bh-usa-07-ferguson-WP.pdf

    Here is glibc’s documentation on interacting with the system:
    http://www.gnu.org/software/libc/manual/html_node/Heap-Consistency-Checking.html

    The short answer:
    Implementations of heap allocation typically stick sentinel values in front of the memory they return (and sometimes after it).

    As a fake example that explains the point, if you ask for 1000 bytes, 1012 bytes /might/ be allocated in a 32 bit system. Say 4 bytes for a pointer to something the Heap finds meaningful, 4 bytes for a sentinel like 0x500DF00D, and maybe 4 bytes at the end for another sentinel like 0xABCDABCD.

    When you do a ‘free’, then free can do several things. Find context by looking at that pointer. Test the sentinels for over/underrun and check for double free. How does it do the latter. Let’s assume the buffer looked good on the 1st free.

    If things look good, it can do something like change 0x500DF00D to 0x0BADF00D.

    So free() can also check for BADF00D to detect multiple attempts to free.

    There are many more issues like thread safety in the allocator; how long do you hang onto that free’d memory sentinel before you hand that block back out for another allocation, etc… But that’s a basic explanation of how it’s normally done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the familiar free(): invalid pointer error. In trying to debug, I ended
I build an application on a machine running Linux (Debian) with kernel 2.6.26-2-amd64 and
I'm cross-compiling an application, but linking blows up with an error that it cannot
In common implementations such as Linux/Glibc, Windows/MSVC and BSD/Mac OS X, will void *p
How is Linux simultaneously 32bit and 64bit? Or is that something handled in glibc?
Hi I am faced with something along the lines of *** glibc detected ***
The following occurs in a linux 2.6.32-220.7.1.el6.x86_64 and g++ 4.4.6 . The following code:
I have an application that was developed for Linux x86 32 bits. There are
I'm trying to make a crossplatform C# application using C#, mono/GTK# on Linux and
Using Linux and glibc, when originating a TCP/IP connection (calling connect() on a socket),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.