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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:50:35+00:00 2026-06-06T23:50:35+00:00

I was browsing through the source of various setjmp and longjmp implementations and noticed

  • 0

I was browsing through the source of various setjmp and longjmp implementations and noticed that not all of the CPU registers are saved in the jmp_buf structure. After reviewing the AMD64 ABI, I noticed that only the callee-saved registers are saved.

I do not understand how the function state can be fully resumed when only some of the registers have been saved. Surely the unsaved registers must have been clobbered many times over and over until I call longjmp later on?

Everything works perfectly however, so there’s definitely something that I don’t understand. I was hoping someone could shed some light on this.

Thanks!

  • 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-06T23:50:37+00:00Added an answer on June 6, 2026 at 11:50 pm

    The setjmp function is a function like any other, and can therefore be assumed to clobber any caller-saved registers. As such, there’s no need for it to save/restore those registers.

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

Sidebar

Related Questions

Question says it all. I tried browsing through the latest tag but could not
I was browsing through one site called BSEINDIA.com ( http://www.bseindia.com/stockreach/stockreach.htm?scripcd=532667 ), i Noticed that
While browsing through the source code of the java.util.concurrency package, I noticed an idiomatic
Hi all I was browsing through some of the Java source code when I
As I'm browsing through a Rails source code, it contains the line: @@autoloads =
I have been browsing through Google for various explanations but I STILL couldn't figure
I've been browsing through all of the CSS related cross-browser questions trying to troubleshoot
Browsing through the source code of Microsoft's sample StockTrader application, I found this snippet
Browsing through some C++ questions I have often seen comments that a STL-friendly class
Browsing through the source of a spring framework project i came across a method

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.