Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-20 Thread Jakub Jelinek
On Thu, Dec 19, 2013 at 10:22:38PM -0700, Jeff Law wrote: + *gsi = create_cond_insert_point (gsi, /*before_p=*/true, + /*then_more_likely_p=*/false, + /*create_then_fallthru_edge=*/true, + then_bb,

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-19 Thread Jakub Jelinek
On Mon, Dec 16, 2013 at 01:55:50PM -0700, Jeff Law wrote: On 12/16/13 11:43, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 07:40:16PM +0100, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are the floating point overflow sanitization

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-19 Thread Jeff Law
On 12/19/13 09:42, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 01:55:50PM -0700, Jeff Law wrote: On 12/16/13 11:43, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 07:40:16PM +0100, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-19 Thread Jeff Law
On 12/16/13 11:40, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 11:25:33AM -0700, Jeff Law wrote: As you note, there's some question as to whether or not this should be acceptable for 4.9. Yes it's well contained, but we really need to draw the line. Is this the last thing for the sanitizers

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-19 Thread Jeff Law
On 12/14/13 12:53, Jakub Jelinek wrote: 2013-12-14 Jakub Jelinek ja...@redhat.com * ubsan.c: Include tree-ssanames.h, asan.h and gimplify-me.h. (ubsan_type_descriptor): Handle BOOLEAN_TYPE and ENUMERAL_TYPE like INTEGER_TYPE. (instrument_bool_enum_load): New

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-18 Thread Joseph S. Myers
On Mon, 16 Dec 2013, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 07:40:16PM +0100, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are the floating point overflow sanitization (haven't looked yet what exactly it is, I suppose

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-18 Thread Joseph S. Myers
On Mon, 16 Dec 2013, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are the floating point overflow sanitization (haven't looked yet what exactly it is, I suppose casts from floating point to integers where the values are out of

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-16 Thread Jeff Law
On 12/14/13 12:53, Jakub Jelinek wrote: Hi! This patch implements one of the few remaining missing ubsan sanitizations, in particular instrumentation which complains about loads of (non-bitfield) bool or enum (the latter in C++ only) value that is outside of the range allowed (0/1 for bool,

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-16 Thread Jakub Jelinek
On Mon, Dec 16, 2013 at 11:25:33AM -0700, Jeff Law wrote: As you note, there's some question as to whether or not this should be acceptable for 4.9. Yes it's well contained, but we really need to draw the line. Is this the last thing for the sanitizers that is still under consideration? It

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-16 Thread Jakub Jelinek
On Mon, Dec 16, 2013 at 07:40:16PM +0100, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are the floating point overflow sanitization (haven't looked yet what exactly it is, I suppose casts from floating point to integers where the

Re: [PATCH] Ubsan load of bool/enum sanitization

2013-12-16 Thread Jeff Law
On 12/16/13 11:43, Jakub Jelinek wrote: On Mon, Dec 16, 2013 at 07:40:16PM +0100, Jakub Jelinek wrote: It can be the last thing, sure. I think the still unimplemented and potentially useful are the floating point overflow sanitization (haven't looked yet what exactly it is, I suppose casts

[PATCH] Ubsan load of bool/enum sanitization

2013-12-14 Thread Jakub Jelinek
Hi! This patch implements one of the few remaining missing ubsan sanitizations, in particular instrumentation which complains about loads of (non-bitfield) bool or enum (the latter in C++ only) value that is outside of the range allowed (0/1 for bool, min/max for minimum precision integer type