Re: [ubsan] Instrument __builtin_unreachable

2013-07-14 Thread Marek Polacek
On Sun, Jul 14, 2013 at 03:44:40PM +0200, Jakub Jelinek wrote: > On Sun, Jul 14, 2013 at 07:39:38AM +0200, Marek Polacek wrote: > > This patch implements sanitizing of the __builtin_unreachable call. > > A call to __builtin_unreachable only emits BARRIER, if we actually get to > > it, > > the beha

Re: [ubsan] Instrument __builtin_unreachable

2013-07-14 Thread Jakub Jelinek
On Sun, Jul 14, 2013 at 07:39:38AM +0200, Marek Polacek wrote: > This patch implements sanitizing of the __builtin_unreachable call. > A call to __builtin_unreachable only emits BARRIER, if we actually get to it, > the behavior is undefined. So, we just replace the call with a call to > the ubsan

Re: [ubsan] Instrument __builtin_unreachable

2013-07-13 Thread Marek Polacek
On Sun, Jul 14, 2013 at 07:39:38AM +0200, Marek Polacek wrote: > This patch implements sanitizing of the __builtin_unreachable call. > A call to __builtin_unreachable only emits BARRIER, if we actually get to it, > the behavior is undefined. So, we just replace the call with a call to > the ubsan

[ubsan] Instrument __builtin_unreachable

2013-07-13 Thread Marek Polacek
This patch implements sanitizing of the __builtin_unreachable call. A call to __builtin_unreachable only emits BARRIER, if we actually get to it, the behavior is undefined. So, we just replace the call with a call to the ubsan library, it then issues an error and dies. The patch is long because I