BRL-CAD

Global registry of recognized magic numbers. More...

Collaboration diagram for Magic Numbers:

Files

file  magic.h
 Global registry of recognized magic numbers.
 

Macros

#define BU_AVS_MAGIC   0x41765321
 
#define BU_BITV_MAGIC   0x62697476
 
#define BU_COLOR_MAGIC   0x6275636c
 
#define BU_EXTERNAL_MAGIC   0x768dbbd0
 
#define BU_HASH_ENTRY_MAGIC   0x48454e54
 
#define BU_HASH_RECORD_MAGIC   0x68617368
 
#define BU_HASH_TBL_MAGIC   0x48415348
 
#define BU_HIST_MAGIC   0x48697374
 
#define BU_HOOK_LIST_MAGIC   0x90d5dead
 
#define BU_IMAGE_FILE_MAGIC   0x6269666d
 
#define BU_LIST_HEAD_MAGIC   0x01016580
 
#define BU_MAPPED_FILE_MAGIC   0x4d617066
 
#define BU_OBSERVER_MAGIC   0x65796573
 
#define BU_PTBL_MAGIC   0x7074626c
 
#define BU_RB_LIST_MAGIC   0x72626c73
 
#define BU_RB_NODE_MAGIC   0x72626e6f
 
#define BU_RB_PKG_MAGIC   0x7262706b
 
#define BU_RB_TREE_MAGIC   0x72627472
 
#define BU_VLB_MAGIC   0x5f564c42
 
#define BU_VLS_MAGIC   0x89333bbb
 
#define BN_GAUSS_MAGIC   0x1e886880
 
#define BN_POLY_MAGIC   0x506f4c79
 
#define BN_SPM_MAGIC   0x41278678
 
#define BN_TABDATA_MAGIC   0x53736d70
 
#define BN_TABLE_MAGIC   0x53706374
 
#define BN_TOL_MAGIC   0x98c734bb
 
#define BN_UNIF_MAGIC   0x00be7460
 
#define BN_VERT_TREE_MAGIC   0x56455254
 
#define BV_VLBLOCK_MAGIC   0x981bd112
 
#define BV_VLIST_MAGIC   0x98237474
 
#define BG_TESS_TOL_MAGIC   0xb9090dab
 
#define RT_ARBN_INTERNAL_MAGIC   0x18236461
 
#define RT_ARB_INTERNAL_MAGIC   0x9befd010
 
#define RT_ARS_INTERNAL_MAGIC   0x77ddbbe3
 
#define RT_BINUNIF_INTERNAL_MAGIC   0x42696e55
 
#define RT_BOT_INTERNAL_MAGIC   0x626f7472
 
#define RT_BREP_INTERNAL_MAGIC   0x42524550
 
#define RT_CLINE_INTERNAL_MAGIC   0x43767378
 
#define RT_DATUM_INTERNAL_MAGIC   0x6461746d
 
#define RT_DSP_INTERNAL_MAGIC   0x00000de6
 
#define RT_EBM_INTERNAL_MAGIC   0xf901b231
 
#define RT_EHY_INTERNAL_MAGIC   0xaaccee91
 
#define RT_ELL_INTERNAL_MAGIC   0x93bb23ff
 
#define RT_EPA_INTERNAL_MAGIC   0xaaccee90
 
#define RT_ETO_INTERNAL_MAGIC   0xaaccee92
 
#define RT_EXTRUDE_INTERNAL_MAGIC   0x65787472
 
#define RT_GRIP_INTERNAL_MAGIC   0x31196205
 
#define RT_HALF_INTERNAL_MAGIC   0xaa87bbdd
 
#define RT_HF_INTERNAL_MAGIC   0x4846494d
 
#define RT_HYP_INTERNAL_MAGIC   0x68797065
 
#define RT_JOINT_INTERNAL_MAGIC   0x4a6f696e
 
#define RT_METABALL_INTERNAL_MAGIC   0x62616c6c
 
#define RT_NURB_INTERNAL_MAGIC   0x002b2bdd
 
#define RT_PART_INTERNAL_MAGIC   0xaaccee87
 
#define RT_PG_INTERNAL_MAGIC   0x9bfed887
 
#define RT_PIPE_INTERNAL_MAGIC   0x7dd7bb3e
 
#define RT_REVOLVE_INTERNAL_MAGIC   0x7265766C
 
#define RT_RHC_INTERNAL_MAGIC   0xaaccee89
 
#define RT_RPC_INTERNAL_MAGIC   0xaaccee88
 
#define RT_SKETCH_INTERNAL_MAGIC   0x736b6574
 
#define RT_SUBMODEL_INTERNAL_MAGIC   0x7375626d
 
#define RT_SUPERELL_INTERNAL_MAGIC   0xff93bb23
 
#define RT_TGC_INTERNAL_MAGIC   0xaabbdd87
 
#define RT_TOR_INTERNAL_MAGIC   0x9bffed87
 
#define RT_VOL_INTERNAL_MAGIC   0x987ba1d0
 
#define RT_PNTS_INTERNAL_MAGIC   0x706e7473
 
#define RT_ANNOT_INTERNAL_MAGIC   0x616e6e6f
 
#define RT_HRT_INTERNAL_MAGIC   0x6872743f
 
#define RT_SCRIPT_INTERNAL_MAGIC   0x73637269
 
#define NMG_EDGEUSE2_MAGIC   0x91919191
 
#define NMG_EDGEUSE_MAGIC   0x90909090
 
#define NMG_EDGE_G_CNURB_MAGIC   0x636e7262
 
#define NMG_EDGE_G_LSEG_MAGIC   0x6c696768
 
#define NMG_EDGE_MAGIC   0x33333333
 
#define NMG_FACEUSE_MAGIC   0x56565656
 
#define NMG_FACE_G_PLANE_MAGIC   0x726b6e65
 
#define NMG_FACE_G_SNURB_MAGIC   0x736e7262
 
#define NMG_FACE_MAGIC   0x45454545
 
#define NMG_INTER_STRUCT_MAGIC   0x99912120
 
#define NMG_KNOT_VECTOR_MAGIC   0x6b6e6f74
 
#define NMG_LOOPUSE_MAGIC   0x78787878
 
#define NMG_LOOP_A_MAGIC   0x6420224c
 
#define NMG_LOOP_MAGIC   0x67676767
 
#define NMG_MODEL_MAGIC   0x12121212
 
#define NMG_RADIAL_MAGIC   0x52614421
 
#define NMG_RAY_DATA_MAGIC   0x01651771
 
#define NMG_REGION_A_MAGIC   0x696e6720
 
#define NMG_REGION_MAGIC   0x23232323
 
#define NMG_RT_HIT_MAGIC   0x48697400
 
#define NMG_RT_HIT_SUB_MAGIC   0x48696d00
 
#define NMG_RT_MISS_MAGIC   0x4d697300
 
#define NMG_SHELL_A_MAGIC   0x65207761
 
#define NMG_SHELL_MAGIC   0x71077345
 
#define NMG_VERTEXUSE_A_CNURB_MAGIC   0x20416e64
 
#define NMG_VERTEXUSE_A_PLANE_MAGIC   0x69676874
 
#define NMG_VERTEXUSE_MAGIC   0x12341234
 
#define NMG_VERTEX_G_MAGIC   0x72737707
 
#define NMG_VERTEX_MAGIC   0x00123123
 
#define RT_ANP_MAGIC   0x41507270
 
#define RT_AP_MAGIC   0x4170706c
 
#define RT_COMB_MAGIC   0x436f6d49
 
#define RT_CONSTRAINT_MAGIC   0x7063696d
 
#define RT_MATERIAL_MAGIC   0x54414d55
 
#define RT_CTS_MAGIC   0x98989123
 
#define RT_DB_TRAVERSE_MAGIC   0x64627472
 
#define RT_DBTS_MAGIC   0x64627473
 
#define RT_DB_INTERNAL_MAGIC   0x0dbbd867
 
#define RT_DIR_MAGIC   0x05551212
 
#define RT_FUNCTAB_MAGIC   0x46754e63
 
#define RT_HIT_MAGIC   0x20686974
 
#define RT_HTBL_MAGIC   0x6874626c
 
#define RT_PIECELIST_MAGIC   0x70636c73
 
#define RT_PIECESTATE_MAGIC   0x70637374
 
#define RT_RAY_MAGIC   0x78726179
 
#define RT_REGION_MAGIC   0xdffb8001
 
#define RT_SEG_MAGIC   0x98bcdef1
 
#define RT_SOLTAB2_MAGIC   0x92bfcde2
 
#define RT_SOLTAB_MAGIC   0x92bfcde0
 
#define RT_TREE_MAGIC   0x91191191
 
#define RT_WDB_MAGIC   0x5f576462
 
#define GED_CMD_MAGIC   0x65786563
 
#define FB_MAGIC   0xfbfb00fb
 
#define FB_WGL_MAGIC   0x574f4642
 
#define FB_OGL_MAGIC   0x584f4642
 
#define FB_X24_MAGIC   0x58324642
 
#define FB_TK_MAGIC   0x544b4642
 
#define FB_QT_MAGIC   0x51544642
 
#define FB_QTGL_MAGIC   0x51474642
 
#define FB_DEBUG_MAGIC   0x44424642
 
#define FB_DISK_MAGIC   0x44494642
 
#define FB_STK_MAGIC   0x53544642
 
#define FB_MEMORY_MAGIC   0x4d454642
 
#define FB_REMOTE_MAGIC   0x524d4642
 
#define FB_NULL_MAGIC   0x4e554642
 
#define FB_SWFB_MAGIC   0x51474642
 
#define ANIMATE_MAGIC   0x414e4963
 
#define BV_MAGIC   0x62766965
 
#define CURVE_BEZIER_MAGIC   0x62657a69
 
#define CURVE_CARC_MAGIC   0x63617263
 
#define CURVE_LSEG_MAGIC   0x6c736567
 
#define CURVE_NURB_MAGIC   0x6e757262
 
#define ANN_TSEG_MAGIC   0x74736567
 
#define DB5_RAW_INTERNAL_MAGIC   0x64357269
 
#define DBI_MAGIC   0x57204381
 
#define DB_FULL_PATH_MAGIC   0x64626670
 
#define DM_MAGIC   0x444d4d4d
 
#define LIGHT_MAGIC   0xdbddbdb7
 
#define MF_MAGIC   0x55968058
 
#define PIXEL_EXT_MAGIC   0x50787400
 
#define PL_MAGIC   0x0beef00d
 
#define PT_HD_MAGIC   0x87687680
 
#define PT_MAGIC   0x87687681
 
#define RESOURCE_MAGIC   0x83651835
 
#define RTI_MAGIC   0x99101658
 
#define WDB_METABALLPT_MAGIC   0x6d627074
 
#define WDB_PIPESEG_MAGIC   0x9723ffef
 
#define WMEMBER_MAGIC   0x43128912
 
#define ICV_IMAGE_MAGIC   0x6269666d
 
#define BU_CKMAG(_ptr, _magic, _str)
 Routines involved with handling "magic numbers" used to identify various in-memory data structures. More...
 

Functions

NORETURN void bu_badmagic (const uint32_t *ptr, uint32_t magic, const char *str, const char *file, int line)
 
const char * bu_identify_magic (uint32_t magic)
 Routines involved with handling "magic numbers" used to identify various in-memory data structures. More...
 

Detailed Description

Global registry of recognized magic numbers.

Magic numbers provide a means to perform run-time sanity checks for memory corruption and uninitialized data.

The one ugly thing about this implementation is that every BRL-CAD structure needs to have its magic number registered here and in the header.

This file is part of LIBBU even though it provides magic numbers for structures in other libraries.

The defines should be considered PRIVATE (even though they are not) and should NEVER be referenced by value.

Macro Definition Documentation

◆ BU_AVS_MAGIC

#define BU_AVS_MAGIC   0x41765321

AvS!

Definition at line 55 of file magic.h.

◆ BU_BITV_MAGIC

#define BU_BITV_MAGIC   0x62697476

bitv

Definition at line 56 of file magic.h.

◆ BU_COLOR_MAGIC

#define BU_COLOR_MAGIC   0x6275636c

bucl

Definition at line 57 of file magic.h.

◆ BU_EXTERNAL_MAGIC

#define BU_EXTERNAL_MAGIC   0x768dbbd0

v???

Definition at line 58 of file magic.h.

◆ BU_HASH_ENTRY_MAGIC

#define BU_HASH_ENTRY_MAGIC   0x48454e54

HENT

Definition at line 59 of file magic.h.

◆ BU_HASH_RECORD_MAGIC

#define BU_HASH_RECORD_MAGIC   0x68617368

hash

Definition at line 60 of file magic.h.

◆ BU_HASH_TBL_MAGIC

#define BU_HASH_TBL_MAGIC   0x48415348

HASH

Definition at line 61 of file magic.h.

◆ BU_HIST_MAGIC

#define BU_HIST_MAGIC   0x48697374

Hist

Definition at line 62 of file magic.h.

◆ BU_HOOK_LIST_MAGIC

#define BU_HOOK_LIST_MAGIC   0x90d5dead

???? => Nietzsche?

Definition at line 63 of file magic.h.

◆ BU_IMAGE_FILE_MAGIC

#define BU_IMAGE_FILE_MAGIC   0x6269666d

bifm

Definition at line 64 of file magic.h.

◆ BU_LIST_HEAD_MAGIC

#define BU_LIST_HEAD_MAGIC   0x01016580

??e?

Definition at line 65 of file magic.h.

◆ BU_MAPPED_FILE_MAGIC

#define BU_MAPPED_FILE_MAGIC   0x4d617066

Mapf

Definition at line 66 of file magic.h.

◆ BU_OBSERVER_MAGIC

#define BU_OBSERVER_MAGIC   0x65796573

eyes

Definition at line 67 of file magic.h.

◆ BU_PTBL_MAGIC

#define BU_PTBL_MAGIC   0x7074626c

ptbl

Definition at line 68 of file magic.h.

◆ BU_RB_LIST_MAGIC

#define BU_RB_LIST_MAGIC   0x72626c73

rbls

Definition at line 69 of file magic.h.

◆ BU_RB_NODE_MAGIC

#define BU_RB_NODE_MAGIC   0x72626e6f

rbno

Definition at line 70 of file magic.h.

◆ BU_RB_PKG_MAGIC

#define BU_RB_PKG_MAGIC   0x7262706b

rbpk

Definition at line 71 of file magic.h.

◆ BU_RB_TREE_MAGIC

#define BU_RB_TREE_MAGIC   0x72627472

rbtr

Definition at line 72 of file magic.h.

◆ BU_VLB_MAGIC

#define BU_VLB_MAGIC   0x5f564c42

_VLB

Definition at line 73 of file magic.h.

◆ BU_VLS_MAGIC

#define BU_VLS_MAGIC   0x89333bbb

?3;?

Definition at line 74 of file magic.h.

◆ BN_GAUSS_MAGIC

#define BN_GAUSS_MAGIC   0x1e886880

??h? => 512256128

Definition at line 78 of file magic.h.

◆ BN_POLY_MAGIC

#define BN_POLY_MAGIC   0x506f4c79

PoLy

Definition at line 79 of file magic.h.

◆ BN_SPM_MAGIC

#define BN_SPM_MAGIC   0x41278678

A'?x

Definition at line 80 of file magic.h.

◆ BN_TABDATA_MAGIC

#define BN_TABDATA_MAGIC   0x53736d70

Ssmp

Definition at line 81 of file magic.h.

◆ BN_TABLE_MAGIC

#define BN_TABLE_MAGIC   0x53706374

Spct

Definition at line 82 of file magic.h.

◆ BN_TOL_MAGIC

#define BN_TOL_MAGIC   0x98c734bb

??4?

Definition at line 83 of file magic.h.

◆ BN_UNIF_MAGIC

#define BN_UNIF_MAGIC   0x00be7460

??t` => 12481632

Definition at line 84 of file magic.h.

◆ BN_VERT_TREE_MAGIC

#define BN_VERT_TREE_MAGIC   0x56455254

VERT

Definition at line 85 of file magic.h.

◆ BV_VLBLOCK_MAGIC

#define BV_VLBLOCK_MAGIC   0x981bd112

????

Definition at line 86 of file magic.h.

◆ BV_VLIST_MAGIC

#define BV_VLIST_MAGIC   0x98237474

?#tt

Definition at line 87 of file magic.h.

◆ BG_TESS_TOL_MAGIC

#define BG_TESS_TOL_MAGIC   0xb9090dab

????

Definition at line 90 of file magic.h.

◆ RT_ARBN_INTERNAL_MAGIC

#define RT_ARBN_INTERNAL_MAGIC   0x18236461

?#da

Definition at line 94 of file magic.h.

◆ RT_ARB_INTERNAL_MAGIC

#define RT_ARB_INTERNAL_MAGIC   0x9befd010

????

Definition at line 95 of file magic.h.

◆ RT_ARS_INTERNAL_MAGIC

#define RT_ARS_INTERNAL_MAGIC   0x77ddbbe3

w???

Definition at line 96 of file magic.h.

◆ RT_BINUNIF_INTERNAL_MAGIC

#define RT_BINUNIF_INTERNAL_MAGIC   0x42696e55

BinU

Definition at line 97 of file magic.h.

◆ RT_BOT_INTERNAL_MAGIC

#define RT_BOT_INTERNAL_MAGIC   0x626f7472

botr

Definition at line 98 of file magic.h.

◆ RT_BREP_INTERNAL_MAGIC

#define RT_BREP_INTERNAL_MAGIC   0x42524550

BREP

Definition at line 99 of file magic.h.

◆ RT_CLINE_INTERNAL_MAGIC

#define RT_CLINE_INTERNAL_MAGIC   0x43767378

CLIN

Definition at line 100 of file magic.h.

◆ RT_DATUM_INTERNAL_MAGIC

#define RT_DATUM_INTERNAL_MAGIC   0x6461746d

datm

Definition at line 101 of file magic.h.

◆ RT_DSP_INTERNAL_MAGIC

#define RT_DSP_INTERNAL_MAGIC   0x00000de6

????

Definition at line 102 of file magic.h.

◆ RT_EBM_INTERNAL_MAGIC

#define RT_EBM_INTERNAL_MAGIC   0xf901b231

???1

Definition at line 103 of file magic.h.

◆ RT_EHY_INTERNAL_MAGIC

#define RT_EHY_INTERNAL_MAGIC   0xaaccee91

????

Definition at line 104 of file magic.h.

◆ RT_ELL_INTERNAL_MAGIC

#define RT_ELL_INTERNAL_MAGIC   0x93bb23ff

??#?

Definition at line 105 of file magic.h.

◆ RT_EPA_INTERNAL_MAGIC

#define RT_EPA_INTERNAL_MAGIC   0xaaccee90

????

Definition at line 106 of file magic.h.

◆ RT_ETO_INTERNAL_MAGIC

#define RT_ETO_INTERNAL_MAGIC   0xaaccee92

????

Definition at line 107 of file magic.h.

◆ RT_EXTRUDE_INTERNAL_MAGIC

#define RT_EXTRUDE_INTERNAL_MAGIC   0x65787472

extr

Definition at line 108 of file magic.h.

◆ RT_GRIP_INTERNAL_MAGIC

#define RT_GRIP_INTERNAL_MAGIC   0x31196205

1?b?

Definition at line 109 of file magic.h.

◆ RT_HALF_INTERNAL_MAGIC

#define RT_HALF_INTERNAL_MAGIC   0xaa87bbdd

????

Definition at line 110 of file magic.h.

◆ RT_HF_INTERNAL_MAGIC

#define RT_HF_INTERNAL_MAGIC   0x4846494d

HFIM

Definition at line 111 of file magic.h.

◆ RT_HYP_INTERNAL_MAGIC

#define RT_HYP_INTERNAL_MAGIC   0x68797065

hype

Definition at line 112 of file magic.h.

◆ RT_JOINT_INTERNAL_MAGIC

#define RT_JOINT_INTERNAL_MAGIC   0x4a6f696e

Join

Definition at line 113 of file magic.h.

◆ RT_METABALL_INTERNAL_MAGIC

#define RT_METABALL_INTERNAL_MAGIC   0x62616c6c

ball

Definition at line 114 of file magic.h.

◆ RT_NURB_INTERNAL_MAGIC

#define RT_NURB_INTERNAL_MAGIC   0x002b2bdd

?++?

Definition at line 115 of file magic.h.

◆ RT_PART_INTERNAL_MAGIC

#define RT_PART_INTERNAL_MAGIC   0xaaccee87

????

Definition at line 116 of file magic.h.

◆ RT_PG_INTERNAL_MAGIC

#define RT_PG_INTERNAL_MAGIC   0x9bfed887

????

Definition at line 117 of file magic.h.

◆ RT_PIPE_INTERNAL_MAGIC

#define RT_PIPE_INTERNAL_MAGIC   0x7dd7bb3e

}??>

Definition at line 118 of file magic.h.

◆ RT_REVOLVE_INTERNAL_MAGIC

#define RT_REVOLVE_INTERNAL_MAGIC   0x7265766C

revl

Definition at line 119 of file magic.h.

◆ RT_RHC_INTERNAL_MAGIC

#define RT_RHC_INTERNAL_MAGIC   0xaaccee89

????

Definition at line 120 of file magic.h.

◆ RT_RPC_INTERNAL_MAGIC

#define RT_RPC_INTERNAL_MAGIC   0xaaccee88

????

Definition at line 121 of file magic.h.

◆ RT_SKETCH_INTERNAL_MAGIC

#define RT_SKETCH_INTERNAL_MAGIC   0x736b6574

sket

Definition at line 122 of file magic.h.

◆ RT_SUBMODEL_INTERNAL_MAGIC

#define RT_SUBMODEL_INTERNAL_MAGIC   0x7375626d

subm

Definition at line 123 of file magic.h.

◆ RT_SUPERELL_INTERNAL_MAGIC

#define RT_SUPERELL_INTERNAL_MAGIC   0xff93bb23

????

Definition at line 124 of file magic.h.

◆ RT_TGC_INTERNAL_MAGIC

#define RT_TGC_INTERNAL_MAGIC   0xaabbdd87

????

Definition at line 125 of file magic.h.

◆ RT_TOR_INTERNAL_MAGIC

#define RT_TOR_INTERNAL_MAGIC   0x9bffed87

????

Definition at line 126 of file magic.h.

◆ RT_VOL_INTERNAL_MAGIC

#define RT_VOL_INTERNAL_MAGIC   0x987ba1d0

?{??

Definition at line 127 of file magic.h.

◆ RT_PNTS_INTERNAL_MAGIC

#define RT_PNTS_INTERNAL_MAGIC   0x706e7473

pnts

Definition at line 128 of file magic.h.

◆ RT_ANNOT_INTERNAL_MAGIC

#define RT_ANNOT_INTERNAL_MAGIC   0x616e6e6f

anno

Definition at line 129 of file magic.h.

◆ RT_HRT_INTERNAL_MAGIC

#define RT_HRT_INTERNAL_MAGIC   0x6872743f

hrt?

Definition at line 130 of file magic.h.

◆ RT_SCRIPT_INTERNAL_MAGIC

#define RT_SCRIPT_INTERNAL_MAGIC   0x73637269

scri

Definition at line 131 of file magic.h.

◆ NMG_EDGEUSE2_MAGIC

#define NMG_EDGEUSE2_MAGIC   0x91919191

???? => used in eu->l2.magic

Definition at line 135 of file magic.h.

◆ NMG_EDGEUSE_MAGIC

#define NMG_EDGEUSE_MAGIC   0x90909090

????

Definition at line 136 of file magic.h.

◆ NMG_EDGE_G_CNURB_MAGIC

#define NMG_EDGE_G_CNURB_MAGIC   0x636e7262

cnrb

Definition at line 137 of file magic.h.

◆ NMG_EDGE_G_LSEG_MAGIC

#define NMG_EDGE_G_LSEG_MAGIC   0x6c696768

ligh

Definition at line 138 of file magic.h.

◆ NMG_EDGE_MAGIC

#define NMG_EDGE_MAGIC   0x33333333

3333

Definition at line 139 of file magic.h.

◆ NMG_FACEUSE_MAGIC

#define NMG_FACEUSE_MAGIC   0x56565656

VVVV

Definition at line 140 of file magic.h.

◆ NMG_FACE_G_PLANE_MAGIC

#define NMG_FACE_G_PLANE_MAGIC   0x726b6e65

rkne

Definition at line 141 of file magic.h.

◆ NMG_FACE_G_SNURB_MAGIC

#define NMG_FACE_G_SNURB_MAGIC   0x736e7262

snrb

Definition at line 142 of file magic.h.

◆ NMG_FACE_MAGIC

#define NMG_FACE_MAGIC   0x45454545

EEEE

Definition at line 143 of file magic.h.

◆ NMG_INTER_STRUCT_MAGIC

#define NMG_INTER_STRUCT_MAGIC   0x99912120

??!

Definition at line 144 of file magic.h.

◆ NMG_KNOT_VECTOR_MAGIC

#define NMG_KNOT_VECTOR_MAGIC   0x6b6e6f74

knot

Definition at line 145 of file magic.h.

◆ NMG_LOOPUSE_MAGIC

#define NMG_LOOPUSE_MAGIC   0x78787878

xxxx

Definition at line 146 of file magic.h.

◆ NMG_LOOP_A_MAGIC

#define NMG_LOOP_A_MAGIC   0x6420224c

d "L

Definition at line 147 of file magic.h.

◆ NMG_LOOP_MAGIC

#define NMG_LOOP_MAGIC   0x67676767

gggg

Definition at line 148 of file magic.h.

◆ NMG_MODEL_MAGIC

#define NMG_MODEL_MAGIC   0x12121212

????

Definition at line 149 of file magic.h.

◆ NMG_RADIAL_MAGIC

#define NMG_RADIAL_MAGIC   0x52614421

RaD!

Definition at line 150 of file magic.h.

◆ NMG_RAY_DATA_MAGIC

#define NMG_RAY_DATA_MAGIC   0x01651771

?e?q

Definition at line 151 of file magic.h.

◆ NMG_REGION_A_MAGIC

#define NMG_REGION_A_MAGIC   0x696e6720

ing

Definition at line 152 of file magic.h.

◆ NMG_REGION_MAGIC

#define NMG_REGION_MAGIC   0x23232323

####

Definition at line 153 of file magic.h.

◆ NMG_RT_HIT_MAGIC

#define NMG_RT_HIT_MAGIC   0x48697400

Hit?

Definition at line 154 of file magic.h.

◆ NMG_RT_HIT_SUB_MAGIC

#define NMG_RT_HIT_SUB_MAGIC   0x48696d00

Him?

Definition at line 155 of file magic.h.

◆ NMG_RT_MISS_MAGIC

#define NMG_RT_MISS_MAGIC   0x4d697300

Mis?

Definition at line 156 of file magic.h.

◆ NMG_SHELL_A_MAGIC

#define NMG_SHELL_A_MAGIC   0x65207761

e wa

Definition at line 157 of file magic.h.

◆ NMG_SHELL_MAGIC

#define NMG_SHELL_MAGIC   0x71077345

q?sE => shell oil

Definition at line 158 of file magic.h.

◆ NMG_VERTEXUSE_A_CNURB_MAGIC

#define NMG_VERTEXUSE_A_CNURB_MAGIC   0x20416e64

And

Definition at line 159 of file magic.h.

◆ NMG_VERTEXUSE_A_PLANE_MAGIC

#define NMG_VERTEXUSE_A_PLANE_MAGIC   0x69676874

ight

Definition at line 160 of file magic.h.

◆ NMG_VERTEXUSE_MAGIC

#define NMG_VERTEXUSE_MAGIC   0x12341234

?4?4

Definition at line 161 of file magic.h.

◆ NMG_VERTEX_G_MAGIC

#define NMG_VERTEX_G_MAGIC   0x72737707

rsw?

Definition at line 162 of file magic.h.

◆ NMG_VERTEX_MAGIC

#define NMG_VERTEX_MAGIC   0x00123123

??1#

Definition at line 163 of file magic.h.

◆ RT_ANP_MAGIC

#define RT_ANP_MAGIC   0x41507270

APrp

Definition at line 167 of file magic.h.

◆ RT_AP_MAGIC

#define RT_AP_MAGIC   0x4170706c

Appl

Definition at line 168 of file magic.h.

◆ RT_COMB_MAGIC

#define RT_COMB_MAGIC   0x436f6d49

ComI

Definition at line 169 of file magic.h.

◆ RT_CONSTRAINT_MAGIC

#define RT_CONSTRAINT_MAGIC   0x7063696d

pcim

Definition at line 170 of file magic.h.

◆ RT_MATERIAL_MAGIC

#define RT_MATERIAL_MAGIC   0x54414d55

TAMU

Definition at line 171 of file magic.h.

◆ RT_CTS_MAGIC

#define RT_CTS_MAGIC   0x98989123

???#

Definition at line 172 of file magic.h.

◆ RT_DB_TRAVERSE_MAGIC

#define RT_DB_TRAVERSE_MAGIC   0x64627472

dbtr

Definition at line 173 of file magic.h.

◆ RT_DBTS_MAGIC

#define RT_DBTS_MAGIC   0x64627473

dbts

Definition at line 174 of file magic.h.

◆ RT_DB_INTERNAL_MAGIC

#define RT_DB_INTERNAL_MAGIC   0x0dbbd867

???g

Definition at line 175 of file magic.h.

◆ RT_DIR_MAGIC

#define RT_DIR_MAGIC   0x05551212

?U?? => Directory assistance

Definition at line 176 of file magic.h.

◆ RT_FUNCTAB_MAGIC

#define RT_FUNCTAB_MAGIC   0x46754e63

FuNc

Definition at line 177 of file magic.h.

◆ RT_HIT_MAGIC

#define RT_HIT_MAGIC   0x20686974

hit

Definition at line 178 of file magic.h.

◆ RT_HTBL_MAGIC

#define RT_HTBL_MAGIC   0x6874626c

htbl

Definition at line 179 of file magic.h.

◆ RT_PIECELIST_MAGIC

#define RT_PIECELIST_MAGIC   0x70636c73

pcls

Definition at line 180 of file magic.h.

◆ RT_PIECESTATE_MAGIC

#define RT_PIECESTATE_MAGIC   0x70637374

pcst

Definition at line 181 of file magic.h.

◆ RT_RAY_MAGIC

#define RT_RAY_MAGIC   0x78726179

xray

Definition at line 182 of file magic.h.

◆ RT_REGION_MAGIC

#define RT_REGION_MAGIC   0xdffb8001

????

Definition at line 183 of file magic.h.

◆ RT_SEG_MAGIC

#define RT_SEG_MAGIC   0x98bcdef1

????

Definition at line 184 of file magic.h.

◆ RT_SOLTAB2_MAGIC

#define RT_SOLTAB2_MAGIC   0x92bfcde2

???? => l2.magic

Definition at line 185 of file magic.h.

◆ RT_SOLTAB_MAGIC

#define RT_SOLTAB_MAGIC   0x92bfcde0

???? => l.magic

Definition at line 186 of file magic.h.

◆ RT_TREE_MAGIC

#define RT_TREE_MAGIC   0x91191191

????

Definition at line 187 of file magic.h.

◆ RT_WDB_MAGIC

#define RT_WDB_MAGIC   0x5f576462

_Wdb

Definition at line 188 of file magic.h.

◆ GED_CMD_MAGIC

#define GED_CMD_MAGIC   0x65786563

exec

Definition at line 192 of file magic.h.

◆ FB_MAGIC

#define FB_MAGIC   0xfbfb00fb

????

Definition at line 196 of file magic.h.

◆ FB_WGL_MAGIC

#define FB_WGL_MAGIC   0x574f4642

WOFB

Definition at line 197 of file magic.h.

◆ FB_OGL_MAGIC

#define FB_OGL_MAGIC   0x584f4642

XOFB

Definition at line 198 of file magic.h.

◆ FB_X24_MAGIC

#define FB_X24_MAGIC   0x58324642

X2FB

Definition at line 199 of file magic.h.

◆ FB_TK_MAGIC

#define FB_TK_MAGIC   0x544b4642

TKFB

Definition at line 200 of file magic.h.

◆ FB_QT_MAGIC

#define FB_QT_MAGIC   0x51544642

QTFB

Definition at line 201 of file magic.h.

◆ FB_QTGL_MAGIC

#define FB_QTGL_MAGIC   0x51474642

QGFB

Definition at line 202 of file magic.h.

◆ FB_DEBUG_MAGIC

#define FB_DEBUG_MAGIC   0x44424642

DBFB

Definition at line 203 of file magic.h.

◆ FB_DISK_MAGIC

#define FB_DISK_MAGIC   0x44494642

STFB

Definition at line 204 of file magic.h.

◆ FB_STK_MAGIC

#define FB_STK_MAGIC   0x53544642

STFB

Definition at line 205 of file magic.h.

◆ FB_MEMORY_MAGIC

#define FB_MEMORY_MAGIC   0x4d454642

MEFB

Definition at line 206 of file magic.h.

◆ FB_REMOTE_MAGIC

#define FB_REMOTE_MAGIC   0x524d4642

MEFB

Definition at line 207 of file magic.h.

◆ FB_NULL_MAGIC

#define FB_NULL_MAGIC   0x4e554642

NUFB

Definition at line 208 of file magic.h.

◆ FB_SWFB_MAGIC

#define FB_SWFB_MAGIC   0x51474642

SWFB

Definition at line 209 of file magic.h.

◆ ANIMATE_MAGIC

#define ANIMATE_MAGIC   0x414e4963

ANIc

Definition at line 213 of file magic.h.

◆ BV_MAGIC

#define BV_MAGIC   0x62766965

bvie

Definition at line 214 of file magic.h.

◆ CURVE_BEZIER_MAGIC

#define CURVE_BEZIER_MAGIC   0x62657a69

bezi

Definition at line 215 of file magic.h.

◆ CURVE_CARC_MAGIC

#define CURVE_CARC_MAGIC   0x63617263

carc

Definition at line 216 of file magic.h.

◆ CURVE_LSEG_MAGIC

#define CURVE_LSEG_MAGIC   0x6c736567

lseg

Definition at line 217 of file magic.h.

◆ CURVE_NURB_MAGIC

#define CURVE_NURB_MAGIC   0x6e757262

nurb

Definition at line 218 of file magic.h.

◆ ANN_TSEG_MAGIC

#define ANN_TSEG_MAGIC   0x74736567

tseg

Definition at line 219 of file magic.h.

◆ DB5_RAW_INTERNAL_MAGIC

#define DB5_RAW_INTERNAL_MAGIC   0x64357269

d5ri

Definition at line 220 of file magic.h.

◆ DBI_MAGIC

#define DBI_MAGIC   0x57204381

W C?

Definition at line 221 of file magic.h.

◆ DB_FULL_PATH_MAGIC

#define DB_FULL_PATH_MAGIC   0x64626670

dbfp

Definition at line 222 of file magic.h.

◆ DM_MAGIC

#define DM_MAGIC   0x444d4d4d

DMMM

Definition at line 223 of file magic.h.

◆ LIGHT_MAGIC

#define LIGHT_MAGIC   0xdbddbdb7

????

Definition at line 224 of file magic.h.

◆ MF_MAGIC

#define MF_MAGIC   0x55968058

U??X

Definition at line 225 of file magic.h.

◆ PIXEL_EXT_MAGIC

#define PIXEL_EXT_MAGIC   0x50787400

Pxt

Definition at line 226 of file magic.h.

◆ PL_MAGIC

#define PL_MAGIC   0x0beef00d

???? => mm. bee food.

Definition at line 227 of file magic.h.

◆ PT_HD_MAGIC

#define PT_HD_MAGIC   0x87687680

?hv?

Definition at line 228 of file magic.h.

◆ PT_MAGIC

#define PT_MAGIC   0x87687681

?hv?

Definition at line 229 of file magic.h.

◆ RESOURCE_MAGIC

#define RESOURCE_MAGIC   0x83651835

?e?5

Definition at line 230 of file magic.h.

◆ RTI_MAGIC

#define RTI_MAGIC   0x99101658

???X

Definition at line 231 of file magic.h.

◆ WDB_METABALLPT_MAGIC

#define WDB_METABALLPT_MAGIC   0x6d627074

mbpt

Definition at line 232 of file magic.h.

◆ WDB_PIPESEG_MAGIC

#define WDB_PIPESEG_MAGIC   0x9723ffef

?#??

Definition at line 233 of file magic.h.

◆ WMEMBER_MAGIC

#define WMEMBER_MAGIC   0x43128912

C???

Definition at line 234 of file magic.h.

◆ ICV_IMAGE_MAGIC

#define ICV_IMAGE_MAGIC   0x6269666d

bifm

Definition at line 235 of file magic.h.

◆ BU_CKMAG

#define BU_CKMAG (   _ptr,
  _magic,
  _str 
)
Value:
do { \
/* coverity[BAD_SIZEOF] */ \
if (UNLIKELY(( ((uintptr_t)(_ptr) == 0) /* non-zero pointer */ \
|| ((uintptr_t)(_ptr) & (sizeof((uintptr_t)(_ptr))-1)) /* aligned ptr */ \
|| (*((const uint32_t *)(_ptr)) != (uint32_t)(_magic)) /* matches value */ \
))) { \
bu_badmagic((const uint32_t *)(_ptr), (uint32_t)(_magic), _str, __FILE__, __LINE__); \
} \
} while (0)
#define UNLIKELY(expression)
Definition: common.h:379

Routines involved with handling "magic numbers" used to identify various in-memory data structures.

Macros to check and validate a structure pointer, given that the first entry in the structure is a magic number. ((void)(1?0:((_ptr), void(), 0)))

Definition at line 246 of file magic.h.

Function Documentation

◆ bu_badmagic()

NORETURN void bu_badmagic ( const uint32_t *  ptr,
uint32_t  magic,
const char *  str,
const char *  file,
int  line 
)

This function is called when there is something wrong with a pointer. It's primarily a support routine for BU_CKMAG macro, but may be used elsewhere. This function never returns.

◆ bu_identify_magic()

const char * bu_identify_magic ( uint32_t  magic)

Routines involved with handling "magic numbers" used to identify various in-memory data structures.

Given a number which has been found in the magic number field of a structure (which is typically the first entry), determine what kind of structure this magic number pertains to. This is called by the macro BU_CK_MAGIC() to provide a "hint" as to what sort of pointer error might have been made.