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

  • Home
  • SEARCH
  • 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 8373205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:37:15+00:00 2026-06-09T14:37:15+00:00

So I’ve got an application that builds and runs fine. I started playing with

  • 0

So I’ve got an application that builds and runs fine. I started playing with some compiler settings on a bunch of the 20+ static and dynamic libraries it links to, and the app consistently crashes on start at a particular point.

I reverted my build system mods, and and the app is fine again. (However, I forgot to make note of the changes I actually made…)

Purely as a matter interest, since I still have a copy of the bad binary (built in debug mode), I’d like to try and reverse engineer what I did exactly to screw things up. 🙂

Attaching a debugger, I can see that a function in a .so is passing to the main app, via a function call, a function pointer for the main app to use as a callback.

In the frame of the caller (in the .so) the function pointer has one value. In the frame of the callee (in the main app), the function pointer magically has a different value.

When the main app attempts to call the stored function pointer, the program crashes with a segfault (mapper error). The function pointer seems to still have the 2nd value which is presumably wrong.

Any suggestions on how to pick this apart?


Update: More details as requested.

Crash is at:

 0xfffffffffffeac58 ???????? ()
 0x000000000063a040 app_exec_callbacks()
 0xfffffd7ffea14514 dynlib_stuff ()
 0x000000000063a15e other_app_stuff () 
 0x00000000004d10a3 app_stuff ()
 0x0000000000499f20 main ()

Prior to this, the function dynlib_do_setup() passes a function pointer ( of dynlib_callback_handler()) to the app via a call to app_register_callback().

Using a debugger, I can see that within dynlib_do_setup() the function pointer has a value of 0xfffffd7ffea13fa0. Inside the function body of app_register_callback() the parameter suddenly has a value of 0xfffffffffffeac58

Thus, the garbage value of 0xfffffffffffeac58 is stored in the app’s callback table, and not surprisingly, the app crashes when that callback address is called as you can see in the stack trace above.

Again, purely as a matter of educational interest, how/why can this magical corruption happen? How/why did reverting my build system changes suddenly fix this?

Thank you

  • 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-09T14:37:17+00:00Added an answer on June 9, 2026 at 2:37 pm

    Found the answer:

    Compiler bug as the result a certain optimization flag combo. Known but not fixed for the past 3 years. 🙁

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this

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.