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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:11:42+00:00 2026-05-26T16:11:42+00:00

OK, I have this benchmark from SPLASH2 which I am using to test a

  • 0

OK, I have this benchmark from SPLASH2 which I am using to test a tool which I have created. The benchmark has the following struct.

typedef struct _interact {
    struct _interact *next ;          /* Next entry of the list */
    Element *destination ;            /* Partner of the interaction */
    float   formfactor_out ;          /* Form factor from this patch  */
    float   formfactor_err ;            /* Error of FF */
    float   area_ratio ;          /* Area(this) / Area(dest) */
    float   visibility ;          /* Visibility (0 - 1.0) */
} Interaction ;

Looking into the code, I found that area_ratio is never used. However, in the end, I see that the value of area_ratio is not 0, as it is in the beginning. So I placed a watchpoint on this variable, and surprisingly gdb pointed me to a code which modifies visibility (the variable just below the area_ratio).

Now my question is why is this happening. How come area_ratio is modified by modifing visibility. What are the possibilties? Any clue? I’m really puzzled. Note that I’m testing my program on a 64-bit machine. Maybe 64 bit has to do something with it, but I don’t know!

The code is something like this:

/* Create links and finish the job */
inter = get_interaction(process_id) ;
*inter = i12 ;
inter->visibility = VISIBILITY_UNDEF ; // <---- This is what gdb is pointing to
  • 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-26T16:11:43+00:00Added an answer on May 26, 2026 at 4:11 pm

    Ah I got it! Actually what is happening is that i12 is a local variable, which is not initialized to 0 and when we perform *inter = i12;, the area_ratio of i12 is assigned to *inter and since i12‘s area_ratio is random and not necessarily 0, that value of area_ratio is assigned to *inter.

    And by the way, now I’ve realized that gdb shows the line number of the one below the intended line, so its not pointing to the line inter->visibility = VISIBILITY_UNDEF, but the line *inter = i12;

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

Sidebar

Related Questions

I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
Hello Community I am look at C++ assembly, I have compiled a benchmark from
The following is a benchmark of a series of queries I have to run.
The following snippet is code from water-nsq benchmark from SPLASH 2 ... if (comp_last
I have an xml file in a format similar to this: <benchmark> <group> <id>1</id>
I have to transfer a big array from one server to another using a
I have a SQL string, for example SELECT * FROM benchmark WHERE xversion =
I have this code in jQuery, that I want to reimplement with the prototype
I have this idea for a free backup application. The largest problem I need
I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM

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.