Timestamp:
2013-11-15T08:39:36Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6a5b999
Parents:
8797bae
Message:

setjmp() shall be a macro according to C standard

As a matter of fact, when it is a function, the context that was
saved may no longer exist. Excerpt from IRC follows:

vhotspur: jermar, hi: what makes you think setjmp needs to be macro
vhotspur: hmmmm, C99 states that setjmp is macro and longjmp is function,

POSIX states that setjmp can be either macro or function

jermar: from what we have learned about context_save over the years
jermar: you basically capture the stack pointer in context_save()
jermar: if it is a function, you immediately deallocate part of that stack
jermar: so later to return to something which has once been a stack,

but is not anymore

jermar: for instance, you could expect to find the return address from

the call to setjmp() on it, but that could have been overwritten
by some further use of the stack

Also fixed bad definition of buffer type.

(No files)

Note: See TracChangeset for help on using the changeset viewer.