[PATCH] bug.h: Work around GCC PR82365 in BUG()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/20/2017 12:12 PM, Arnd Bergmann wrote:
>> Sorry, I didn't realize we are missing the stack trace now which you removed
>> from the patch - why ? Did u intend to reduce inline generated code for the
>> stack dump calls - which sounds like a great idea. But it would only work
>> for the synchronous abort() but not when builtin translates to actual trap
>> inducing instruction.
> 
> I assumed that the trap instruction would trigger the register and
> stack dump, as it does on all other architectures.

Only if __builtin_trap() translated to that instruction. Otherwise we need to do 
this inside abort()

> The most common
> way this is handled is to have one instruction that is known to trap,
> and use that to trigger a BUG(), and have __builtin_trap() issue
> that instruction as well.

Good point. So we'll need ARC specific abort anyways.


> You might also want to implement CONFIG_DEBUG_BUGVERBOSE
> support to attach further data to it.

OK I'll take a look !

> How about overriding abort() with the same instruction that
> __builtin_trap() inserts on newer compilers then? That should
> make the behavior consistent.

Yeah this is a great point ! Will do

thx,
-Vineet



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux