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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:33:09+00:00 2026-05-23T10:33:09+00:00

I have three lines (version) of a linux product. V1 works fine in the

  • 0

I have three lines (version) of a linux product. V1 works fine in the customer. V2 and V3
crashed and the fix seems to be a memset call after a malloc call.

What is the deeper explanation on this topic? Why memset resolved the issue?

  • 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-23T10:33:09+00:00Added an answer on May 23, 2026 at 10:33 am

    My guess without a code example is that you were operating on the buffer or struct you malloc’d with assumptions that its contents would be initialized with certain default values. Malloc doesn’t initialize the memory it hands back, so unless you memset or use some other initialization, the values in that memory could be anything, and therefore, if you’re trying to check a pointer assuming it’d be NULL or that an int will be zero, you can’t make that assumption without initializing the memory first.

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

Sidebar

Related Questions

I am running Cygwin Python version 2.5.2. I have a three-line source file, called
I have a file named file with three lines: line one line two line
I have a tcp socket sending three lines like this out2.println(message1\n); out2.println(message2\n); out2.println(message3\n); and
I'm working in OpenGL, with VBOs, and I have a set of three lines
linux 3.5.6-1.fc17.x86_64 GNU bash, version 4.2.37 Hello, I have the following bash script file.
I have a Linux binary, without sources, that works on one machine, and I'd
I have some raw open-source code for a modified version of the linux kernel.
I have there lines in my RegisterToutes : routes.MapRoute(Pages3, {url1}/{url2}/{url3}, MVC.Page.RedirectTo(), new { url1
I have an index page with three links as follws. When I click the
I have text file with something like first line line nr 2 line three

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.