[cfe-commits] r141803 - in /cfe/trunk: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h lib/AST/DeclPrinter.cpp lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp test/Analysis/security-syntax-checks.m test/CodeGen/function-attributes.c

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Mon Oct 17 07:51:09 PDT 2011

> void savectx(struct pcb *);
> Does that sound like anything with a relation to setjmp?

The only relation important in here is returning twice.

> I don't believe in cargo cult programming, so this doesn't exactly sound
> like a good reason for keeping it.

In which case gcc can drop it too. Since these are usually obscure 
functions, it in nice to ask there too.

>> What does savectx do on your system?
> It's an internal function, used to synchronise some data structure
> before creating a new thread, exposed to userland for various (slightly
> broken...) reasons.

Do you have a pointer? Looking around and asking on #gcc, it looks like 
it is just a BSD version of

int getcontext(ucontext_t *ucp);

so it does return twice. The data structure being the continuation so 
that user space threads can be implemented.

Given that it does look like the correct fix is to correct the signature 
in Builtins.def.

> Joerg


More information about the cfe-commits mailing list