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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:33:42+00:00 2026-06-18T21:33:42+00:00

First of all, I’m not sure this is a specific platform error. I’m using

  • 0

First of all, I’m not sure this is a specific platform error. I’m using openssl library to generate big prime number and private/public keys. It ran fine when prime number is relatively small (128 bits), but I can’t compile and got an error when the prime number was getting bigger (256, 512 bits).

DH * params = DH_new(); 
params = DH_generate_parameters(512, 5, NULL, NULL);

DH_generate_key(params); // can't get through this point when prime bits getting bigger

above code produced an error:

 malloc: *** error for object 0x7ffba8403c88: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

I’m using openssl 1.0.1 on MAC OX 10.8.2. I’d appreciate for any advices.

UPDATE: Another way to produce this kind’s error is creating a thread before above code. Either way, it always gave me error at sub-routine DH_generate_key.

  • 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-06-18T21:33:43+00:00Added an answer on June 18, 2026 at 9:33 pm

    Error messages related to heap corruption such as this message from malloc() indicate that you have memory management bugs, such as using memory after freeing it, or overrunning the allocated memory. It is normal for such malloc() error messages to occur at different locations than where the actual programming error happened. Run your application in Valgrind to get some useful information on what’s going wrong.

    Unrelated to the error, but you have a memory leak in these two lines of your code above:

    DH * params = DH_new(); 
    params = DH_generate_parameters(512, 5, NULL, NULL);
    

    The pointer to the allocated DH structure is overwritten in the second line with a new DH structure returned by DH_generate_parameters(). The buffer allocated by DH_new() is lost. This is not the cause of the error message though.

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

Sidebar

Related Questions

First of all, I am using this gemfile here : https://github.com/ryanwkan/covetous After initializing my_profile
First of all, this isn't for a keylogger, it's for an input in a
First of all there is probably a question like this already but i couldn't
First of all, apologize because I have seen some posts about this, but I
First of all, let me say that I am not a professional coder -
First of all this is all just concept, I have no actual programming done
(First of all, sorry for my english, it's not my first language) I have
First all, I am still learning CakePHP and I am close to ZERO using
First of all, this code , as ugly as it is, works, for all
First of all, I'm using ARC. If I have a class that, for example,

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.