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 6716507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:44:31+00:00 2026-05-26T08:44:31+00:00

I am currently (don’t ask why :P) implementing my own versions of malloc() and

  • 0

I am currently (don’t ask why :P) implementing my own versions of malloc() and free(), and have intentionally placed an assert(0) at the first line of free() for current debugging purposes.

A driver program is testing a random sequence of these malloc() and free() to test the correctness of my implementations.

When I run the driver, however, the shell prints out that “Assertion ‘0’ failed”, keeps running for a little bit longer, and then prints “Aborted”. Actually, it looks like it is able to even call malloc() several times between reporting the failure of the assertion and then finally reporting that the program has aborted. I am sure of this because of certain printf statements I have placed in the code to print out certain variables for debugging purposes.

I am not asking for any help at all about implementing malloc() and free(). Would just like to know what is means when it seems that the program continues to run for a short time (even possibly calling other user-defined functions) even after an assertion has been reported to fail.

  • 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-26T08:44:32+00:00Added an answer on May 26, 2026 at 8:44 am

    If you’re seeing ‘assertion failed’, followed by debugging prints, followed by an exit, there are two obvious possibilities.

    One is that the assertion message and the debugging prints are going into two different buffered output streams (e.g. stderr and stdout) that are not getting flushed in the same order they are filled.

    Another is that multiple threads of execution are hitting malloc().

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

Sidebar

Related Questions

We have a CMS where people can upload images. We currently don't offer a
We don't currently have our SQL Server objects in any form of source control.
Just a quick question. I don't use sitefinity and I don't currently have access
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently I'm brushing up on my Fortran95 knowledge (don't ask why)... I'm running in
I have a quick question. I currently don't have my device with me to
Unfortunately I still have to support ie6. I currently don't have a machine with
I'm facing a problem in C++ for which I currently don't have an elegant
I just defined some forms in /lib/form/doctrine/ But the form elements currently don't have
I currently don't have any problems using: -(IBAction)products:(id)sender { products = [[Products alloc] initWithNibName:@Products

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.