Re: BUG() Calls

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

 



Hi

> I see BUG() call in Linux kernel at various places. When any of these
lines of
> code are executed it prints kernel crash message alone with
>
> kernel BUG at filename:line number!
>
> What does this means ?

well when writing normall C code you can stop the program and hang it until
a debugger is attached but the kernel is harder because a debugger cannot be
attached

so when you have written code to try to test for things eg check for certin
conditions that
should not happen and they exist you can call BUG to get a kernel opps which
could have gone
unnoticed but could be much more fatel down the line like memory curruption
etc..

hope this helps a bit
    James





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux