[LLVMdev] Proposal: Loads/stores with deterministic trap/unwind behavior
Peter Collingbourne
peter at pcc.me.uk
Tue Apr 1 16:54:54 PDT 2014
On Tue, Apr 01, 2014 at 09:03:10PM +0100, David Chisnall wrote:
> On 1 Apr 2014, at 19:38, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> > I'm pretty sure that it is possible to unwind through signal handlers. This
> > is, for example, how gccgo implements some run-time panics.
>
> It' highly OS dependent and not something to rely on for any vaguely-portable code. We do support it in FreeBSD, but the extra logic caused a slowdown that users objected to when we introduced it and so I can well imagine that other systems would prefer the faster approach - it has some quite nasty interactions with the run-time linker. From what I recall, at least one of the other UNIX-like systems that we looked at did claim to support it, but got the locking wrong so it worked fine 99% of the time and deadlocked the remaining 1%...
Right, this feature would obviously require a certain level of OS support
and I'd expect a portable compiler to be able to pick a compatible way to
implement null checks.
Thanks,
--
Peter
More information about the llvm-dev
mailing list