On Tue, 12 Nov 2013, Jeff Law wrote:

On 11/12/13 10:14, Marc Glisse wrote:
You didn't like Jakub's comment about __builtin_unreachable?
No, it's certainly not appropriate for this optimization. The problem with using builtin_unreachable is if you do reach that point, you fall into an unrelated blob of code in the executable. That is a huge security issue.

I guess this will end up as a flag and the debate will only be about the default value of the flag?

(-fsanitize=Idontrememberwhat would already be such a flag ;-) but you may prefer a more specific one)

Note that security is a concern for some applications, but for others it is irrelevant and performance trumps it. I would even consider a flag that turns abort, trap, etc into __builtin_unreachable.

Anyway, thanks for the optimization, I am only discussing the details because I like it.

--
Marc Glisse

Reply via email to