Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setjmp invalidates jmp_buf when function returns #25

Open
blegat opened this issue Jun 4, 2013 · 1 comment
Open

setjmp invalidates jmp_buf when function returns #25

blegat opened this issue Jun 4, 2013 · 1 comment

Comments

@blegat
Copy link
Contributor

blegat commented Jun 4, 2013

Dans la doc, il est mis pour setjmp que

The stack context will be invalidated if the function which called setjmp() returns.

Pourtant, dans l'exemple du syllabus, on a

  f();
  g();

comme c'est dans f qu'on fait setjmp et dans g qu'on fait longjmp, f a déjà retourné lorsqu'on appelle longjmp.

@dsarkozi
Copy link
Contributor

dsarkozi commented Jun 6, 2013

Je pense en effet qu'il faudrait appeler g() dans f(), non ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants