> Formatting. The {} should be indented like static
> and return 2 columns to the right of that.
Right.
> For base_addr computation, you don't really need g or ptr_checks,
> do you? So why not move the:
> auto_vec<gimple> *ptr_checks = &ctx->asan_check_map.get_or_insert (ptr);
> gimple g = maybe_get_dominating_check (*ptr_checks);
> lines below the if?
I can do this. But then base_checks would be invalidated when I call
get_or_insert for ptr_checks so I'll still have to hash_map::get.
> If asan (kernel-address) is
> recovering, I don't see a difference from not reporting two different
> invalid accesses to the same function and not reporting two integer
> overflows in the same function, at least if they have different
> location_t.
Ok, agreed. BTW how about replacing '& SANITIZE_KERNEL_ADDRESS' with '&
SANITIZE_ADDRESS'? I know we do not support recovery for userspace but
having a general enum sounds more logical.
-Y
--
View this message in context:
http://gcc.1065356.n5.nabble.com/PATCH-Optimize-UBSAN-NULL-checks-add-sanopt-c-tp1085786p1095527.html
Sent from the gcc - patches mailing list archive at Nabble.com.