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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:13:43+00:00 2026-05-22T21:13:43+00:00

I have a program that crashes after some days of work, so I decided

  • 0

I have a program that crashes after some days of work, so I decided run it with Valgrind. I have cleaned up all the warnings but this one:

==30522== Conditional jump or move depends on uninitialised value(s) 
==30522==    at 0x405E32: main (main.c:548)
==30522==  Uninitialised value was created by a stack allocation
==30522==    at 0x405652: main (main.c:80)

main.c:80 is the first line of the program:

int main(int argc, char *argv[])
{  // <- this is the line 80

I think I already cleaned up all the bugs, but it still get me mad. What’s up?

                    listado_ips->ocr=(float)listado_ips->ocr/tiempo_milisecs; // <-line 548

A couple lines before this:

milisecs1=milisecs1-milisecs2
tiempo_milisecs=(float)milisecs1/1000;

milisecs1 is initialised.

  • 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-22T21:13:43+00:00Added an answer on May 22, 2026 at 9:13 pm

    The problem is that in the list of variables created at the start of main(), there is at least one that is still uninitialized when you read it on line 548.

    Since you’ve not shown what’s at line 548, nor what is between line 80 and 548, we can’t easily tell you more. But concentrate on line 548 – not line 80.


    If line 548 is:

    listado_ips->ocr=(float)listado_ips->ocr/tiempo_milisecs;
    

    then analyze where ‘tiempo_milisecs‘ is set. If that’s set cleanly, then you need to look at where listado_ips->ocr is set. We can reasonably safely assume that listado_ips itself (the pointer) is initialized.

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

Sidebar

Related Questions

I have a C++ program on Linux that crashes after some time with the
I have a program that crashes (seemingly) randomly after 2-4h of runtime. I am
I'm having some trouble with a program using pthreads, where occassional crashes occur, that
I have a Java program which depends on a native library that crashes randomly
I have a C++ program that crashed due to a bug. It would not
I have program that has a variable that should never change. However, somehow, it
I have program that runs fast enough. I want to see the number of
I have a program that spits out both standard error and standard out, and
I have a program that creates a Windows user account using the NetUserAdd() API
I have a program that uses the mt19937 random number generator from boost::random. I

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.