Re: [PATCH][RFC] getting rid of stupid loop in BUG()

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

 




On Wed, 25 Jul 2007, Al Viro wrote:
> 
> Umm...  Actually, we might be able to do something like
> {
> 	l: __builtin_trap();
> 	static struct ... v __attribute__((section(...))) = { &&l, n, file };

No.

A C-level label is a pointer to a C-level construct.

The compiler may have reasons to put other instructions in between the 
label and the final end result of the __builtin_trap. The above may work 
for some trivial test-case, but in the end, the label and the __builtin 
are *not* atomic, and the compiler may well end up having register spills 
etc in there, or having CSE'd two traps, or any number of details meaning 
that the label doesn't point to the exact ud2 instruction.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux