Mach异常-其他异常类型-iOS Exception Code 之 Magic Number

起源和写法

Hexspeak最早是程序员用来清晰独特地标记内存和数据的一些魔术数字,使用以0-9与A-F构成的16进制数表示一些简单的英文单词。

Hexspeak的转写规则为:数字“0”表示字母“O”,“1”表示“I”或“L”,“5”表示“S”,“7”表示“T”,“6”、“9”则各自表示“G”与“g”,其它的数字则可利用画谜和Leet的规则来借代字母,例如“defecate”就可用“DEFECA7E”或“DEFEC8”来表示。被称之为:魔术数

16进制魔术数在许多处理器、操作系统和调试工具中都得到应用,且尤常作为调试量使用。

一些崩溃报告可能会含有一个未命名的Exception Type,它将以一个16进制的值(例如:c00010ff)的形式打印。假如设备收到了一个这样的崩溃报告,直接查看Exception Codes字段寻找更多的信息。

以下几个常见的:Exception Code:

0xbaaaaaad:此种类型的log意味着该Crash log并非一个真正的Crash,它仅仅只是包含了整个系统某一时刻的运行状态。通常可以通过同时按Home键和音量键,手机死机的时候,会如此操作。

0xbad22222:当VOIP程序在后台太过频繁的激活时,系统可能会终止此类程序

0x8badf00d:程序被watch dog终止。应用花费太长时间启动、响应系统事件。通常导致这个问题是做了在主线程执行了同步的请求。无论什么操作在Thread 0都需要移动到后台线程,或者异步处理,以免它阻塞主线程。

0xc00010ff:程序执行大量耗费CPU和GPU的运算,导致设备过热,触发系统过热保护被系统终止。为了使应用更高效运行可以查看WWDC session iOS Performance and Power Optimization with Instruments。

0xdead10cc:程序退到后台时还占用系统资源(如通信录数据库) ,被系统终止。

0xdeadfa11:表明应用被用户强制退出。强制退出发生在当用户第一次按下开关机按钮直到"滑动来关机"出现,系统强制退出任何正在运行的任务。

全部Exception Code:

Many computer processors, operating systems, and debuggers make use of magic numbers, especially as a magic debug value。

0x0000000FF1CE: ("office") is used as the last part of product codes (GUID) for Microsoft Office components (Visible in registry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall registry key).

0x00BAB10C: ("oo-ba-block") is used as the magic number for the [ZFS] uberblock.

0x8BADF00D:("ate bad food") is used by [Apple] in [iOS] crash reports, when an application takes too long to launch, terminate, or respond to system events.

0x1BADB002:"1 bad boot" Multiboot header magic number.

0x1CEB00DA: ("ice buddha") was used as the origin for the binary file parser IceBuddha.

0xB105F00D: ("BIOS food") is the value of the low bytes of last four registers on ARM PrimeCell compatible components(the component_id registers),used to identify correct behavior of a memory-mapped component。

0xB16B00B5: ("big boobs") was required by Microsoft‘s Hyper-V hypervisor to be used by Linux guests as their "guest signature". One proposal suggested changing it to 0x0DEFACED ("defaced").Actually,it was initially changed to decimal and then replaced entirely。

0xBAAAAAAAD: ("baaaaaaad") is used by Apple’s iOS exception report to indicate that the log is a stackshot of the entire system,not a crash report。

0xBAADF00D: ("bad food") is used by Microsoft‘s LocalAlloc(LMEM_FIXED) to indicate uninitialised allocated heap memory when the debug heap is used.

0xBAD22222:("bad too repeatedly") is used by Apple’s iOS exception log to indicate that a VoIP application has been terminated by iOS because it resumed too frequently

0xBADA55:("bad ass") citation needed

0xBADDCAFE: ("bad cafe") is used by Libumem to indicate uninitialized memory area

0xC00010FF:("cool off") is used by Apple in iOS crash reports,when application was killed in response to thermal event

C15C:0D06:F00D: ("cisco dog food") used in the IPv6 address of www.cisco.com on World IPv6 Day. "Dog food" refers to Cisco eating its own dog foodwith IPv6.

0xCAFEBABE: ("cafe babe") is used by plan 9’s libc as a poison value for memory pools。It is also used by Mach-O to identify Universal object files, and by the Java programming language to identify Java bytecode class files.It was originally created by NeXTSTEP developers as a reference to the baristas at Peet’s Coffee & Tea。

0xCAFED00D: ("Cafe Dude") is used by Java as a magic number for their pack200 compression.

0xCEFAEDFE: ("face feed") is used by Mach-O to identify flat (single architecture)object files. In little endian this reads FACEFEED, "Face Feed".

0xD15EA5E: ("disease") is a flag that indicates regular boot on the Nintendo GameCube and Wii consoles.

0xDABBAD00: ("dabba doo") is the name of a blog on computer security.

0xDEADBAAD: ("dead bad") is used by the Android libc abort() function whennative heap corruption is detected.

0xDEADBABE: ("dead babe") is used by IBM Jikes RVM as a sanity check of the stack of the primary thread

0xDEADBEAF: ("dead beaf") is part of the signature code of Jazz jackrabbit 2 tileset files. Level files have less room for their signatures and use 0xBABE(”babe”)instead. It is also the header of campaign gamesaves used in the Halo Game Series.

Deadbeef-dead-beef-dead-beef0000075:(“dead beef”) is the GUID assigned to hung/dead virtual machines in Citrix XenServer.

**0xDEADBEEF **:("dead beef") is frequently used to indicate a software crash or deadlock in embedded systems. 0xDEADBEEF was originally used to mark newly allocated areas of memory that had not yet been initialized -- when scanning a memory dump, it is easy to see the 0xDEADBEEF. It is used by IBM RS/6000 systems, Mac OS on 32-bit PowerPC processors and the Commodore Amiga as a magic debug value. On Sun Microsystems‘ Solaris, it marks freed kernel memory. On OpenVMS running on Alpha processors, 0xDEADBEEF can be seen by pressing CTRL-T. The DEC Alpha SRM console has a background process that traps memory errors, identified by PS as "BeefEater waiting on 0xdeadbeef".

0xDEADC0DE: ("dead code") is used as a marker in OpenWRT firmware to signify the beginning of the to-be created jffs2 filesystem at the end of the static firmware.

0xDEADDEAD: ("dead dead") is the bug check (STOP) code displayed when invoking a Blue Screen of Death either by telling the kernel via the attached debugger, or by using a special keystroke combination. This is usually seen by driver developers, as it is used to get a memory dump on Windows NT based systems. An alternative to 0xDEADDEAD is the bug check code 0x000000E2,as they are both called MANUALLY_INITIATED_CRASH as seen on the Microsoft Developer Network.

0xDEADD00D: ("dead dude") is used by Android in the Dalvik virtual machine to indicate a VM abort.

**0xDEADFA11: ("dead fall") is used by Apple in iOS crash reports, when the user force quits an application.

0xDEAD10CC: ("dead lock") is used by Apple in iOS crash reports, when application holds on to a system resource while running in the background.

0xDEADFEED: ("dead feed") is used by Apple in iOS crash report,when a timeout occurs spawning a service.

0xDEFEC8ED: ("defecated") is the magic number for OpenSolaris core dumps.

0xE011CFD0: is used as magic number for Microsoft Office files. In little endian this reads D0CF11E0, "docfile0".

face:b00c: ("facebook") used in the IPv6 address of www.v6.facebook.com

0xFACEFEED: ("face feed") is used by Alpha servers running Windows NT. The Alpha Hardware Abstraction Layer (HAL) generates this error when it encounters a hardware failure.

0xFBADBEEF: ("bad beef") is used in the WebKit and Blink layout engines to indicate a known,unrecoverable error such as out of memory.

0xFEE1DEAD: ("feel dead") is used as a magic number in the Linux reboot system call.

0xFEEDBABE: ("feel babe") is the magic number used to indicate the beginning of an OpenRG flash partition descriptor.

0xFEEDFACECAFEBEEF: ("feel face café beef") is the magic number used to send as a password via serial wire to rescue some NXP.created controller devices from boot failures.

0x4B1D:(“forbid den”)war a password in some calibration consoles for developers to peer deeper into control registers outside the normal calibration memory range.

0xB000 0xDEAD: ("boo dead") war displayed by the HP 9000 Model 840 when it crashed.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,589评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,615评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,933评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,976评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,999评论 6 393
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,775评论 1 307
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,474评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,359评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,854评论 1 317
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,007评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,146评论 1 351
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,826评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,484评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,029评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,153评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,420评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,107评论 2 356

推荐阅读更多精彩内容