[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_
From: |
Tommi Rantala |
Subject: |
Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness |
Date: |
Tue, 13 Nov 2012 12:34:09 +0200 |
2012/11/13 Ladislav Michl <address@hidden>:
> On Tue, Nov 13, 2012 at 11:41:18AM +0200, Tommi Rantala wrote:
>> > @@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
>> > SOFTWARE. */
>> > # endif
>> > #endif
>> >
>> > +#if defined(HAVE__BUILTIN_UNREACHABLE)
>> > +# define unreachable() __builtin_unreachable()
>> > +#else
>> > +# define unreachable() do { for (;;) ; } while (0)
>> > +#endif
>> > +
>>
>> I'm a bit surprised by the loop, I would expect something like a call
>> to abort(), so that if someone actually hits this they'll get a signal
>> and a core dump.
>
> The whole purpose is to signal compiler nothing past this point is
> ever executed to silence warning.
OK, makes sense!
>> How about defining this only when we do _not_ have the GCC builtin
>> function available, something like:
>>
>> #ifndef HAVE__BUILTIN_UNREACHABLE
>> # define __builtin_unreachable() ...
>> #endif
>
> I do not like hiding stuff too much. __builtin prefix should mean exactly
> that it is built in. Just checked kernel source, they are doing it the same
> way, so it must be right ;-)
Fair enough.
Thanks,
Tommi
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Ladislav Michl, 2012/11/13
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Tommi Rantala, 2012/11/13
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Ladislav Michl, 2012/11/13
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness,
Tommi Rantala <=
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Ladislav Michl, 2012/11/14
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Tommi Rantala, 2012/11/14
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Ladislav Michl, 2012/11/14
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Tommi Rantala, 2012/11/14
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Arun Sharma, 2012/11/14
- Re: [Libunwind-devel] [PATCH 20/27] ARM: fix non-signal-frame local unw_resume() due to compiler optimization cleverness, Arun Sharma, 2012/11/25