View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000611 | LDMud 3.3 | Runtime | public | 2009-03-10 15:03 | 2009-03-12 17:08 |
Reporter | zesstra | Assigned To | zesstra | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | MacOS X | OS Version | 10.5.x |
Product Version | 3.3.718 | ||||
Target Version | 3.3.719 | Fixed in Version | 3.3.719 | ||
Summary | 0000611: Crash in remove_from_free_list() during restore_object() | ||||
Description | When compiled for x86_64 (-m64 -mtune=core2), the driver crashes upon loading a specific savefile on my system. On a i386 platform or with a different savefile there is no problem. It seems to be some kind of memory problem/corruption. 2009.03.10 20:44:37 Seeding PRNG from /dev/urandom. 2009.03.10 20:44:37 LDMud 3.3.718 (Build $Revision$) (stable) 2009.03.10 20:44:37 Hostname 'phoenix' address '192.168.178.28' 2009.03.10 20:44:37 UDP port 4246 already bound! 2009.03.10 20:44:37 No simul_efun 2009.03.10 20:45:00 remove_from_free_list: block 0x101be2100, magic match failed: expected 3752850158, found 0 2009.03.10 20:45:00 Current object was secure/errord 2009.03.10 20:46:51 LDMud aborting on fatal error. I have prepared a stripped mudlib and the savefile as test case, but I would not like to publish the savefile at this point as there may be some private data in it. The problem occurs also in older versions (tested 100 revisions back) of the driver but not with standard configure settings, therefore I will attach my machine.h and config.h as well for the record. | ||||
Steps To Reproduce | export CFLAGS="-m64 -mtune=core2 -ggdb3 -O0" export LDFLAGS="-m64 -mtune=core2 -ggdb3 -O0" export EXTRA_CFLAGS=$CFLAGS (use attached machine.h and config.h) make ./ldmud -m /path/to/test/case 4713 | ||||
Additional Information | (gdb) bt full #0 fatal (fmt=0x10011a950 "remove_from_free_list: block %p, magic match failed: expected %lu, found %lu\n") at simulate.c:651 va = {{ gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fff5fbfb4a8, reg_save_area = 0x7fff5fbfb3d0 }} ts = 0x1001406a0 "2009.03.10 20:46:51" 0000001 0x00000001000f9770 in remove_from_free_list (ptr=0x101be2100) at slaballoc.c:2309 p = (struct free_block *) 0x101ba2000 q = (struct free_block *) 0x7fff5fbfb560 r = (struct free_block *) 0x40100 s = (struct free_block *) 0x101ba1ff8 t = (struct free_block *) 0x101be20c8 0000002 0x00000001000faa39 in add_large_free (ptr=0x101ba2000, block_size=32800) at slaballoc.c:3037 No locals. 0000003 0x00000001000fae4a in large_malloc (size=1749, force_more=false) at slaballoc.c:3293 chunk_size = 262400 block_size = 32800 extra = 64 real_size = 4323311736 ptr = (word_t *) 0x101ba2000 orig_size = 13968 mess = "HARD_MALLOC_LIMIT reached.\n" 0000004 0x00000001000f89b2 in mem_alloc (size=96) at slaballoc.c:1719 numObjects = 145 slabSize = 13968 slab = (mslab_t *) 0x7fff5fbfb7a0 block = (word_t *) 0x0 ix = 3 0000005 0x00000001000fc795 in xalloc_traced (size=80, malloc_trace_file=0x100111b30 "mapping.c", malloc_trace_line=335) at xalloc.c:565 p = (word_t *) 0x101b5d8a0 0000006 0x0000000100086d09 in new_map_chain (m=0x101b48f60) at mapping.c:335 rc = (map_chain_t *) 0xb 0000007 0x00000001000868c1 in _get_map_lvalue (m=0x101b48f60, map_index=0x7fff5fbfb7a0, need_lvalue=true, check_size=false) at mapping.c:1007 mc = (map_chain_t *) 0x0 hm = (mapping_hash_t *) 0x101b0dbb8 entry = (svalue_t *) 0x0 idx = -1 local_const0 = { type = 0, x = { exponent = 0, closure_type = 0, quotes = 0, num_arg = 0, extern_args = 0, generic = 0 }, u = { str = 0x0, charp = 0x0, number = 0, ob = 0x0, vec = 0x0, strct = 0x0, map = 0x0, lambda = 0x0, mantissa = 0, cb = 0x0, generic = 0x0, lvalue = 0x0, protected_lvalue = 0x0, protected_char_lvalue = 0x0, protected_range_lvalue = 0x0, error_handler = 0 } } 0000008 0x00000001000a27e5 in restore_mapping (svp=0x101b41e40, str=0x7fff5fbfbc68) at object.c:7416 z = (mapping_t *) 0x101b48f60 key = { type = 3, x = { exponent = 32352, closure_type = 32352, quotes = 32352, num_arg = 32352, extern_args = 32352, generic = 32352 }, u = { str = 0x101023f30, charp = 0x101023f30 "?", number = 4311891760, ob = 0x101023f30, vec = 0x101023f30, strct = 0x101023f30, map = 0x101023f30, lambda = 0x101023f30, mantissa = 4311891760, cb = 0x101023f30, generic = 0x101023f30, lvalue = 0x101023f30, protected_lvalue = 0x101023f30, protected_char_lvalue = 0x101023f30, protected_range_lvalue = 0x101023f30, error_handler = 0x101023f30 } } data = (svalue_t *) 0x101b41970 i = 1 tmp_par = { str = 0x101b5d957 ",]),\"GUILD.magie_sp\":([\"2ab8fcc56cf505567837f5a565c51760\":([\"F_UID\":\"GUILD.magie_sp\",\"F_CLI\":\"konzentriere\",\"F_MSG\":\"Numeric overflow: 1235742139 + 1235742515\\n\",\"F_OBJ\":\"spellbooks/magie_sp\",\"F_TYPE\""..., num_values = 1 } siz = 4 0000009 0x00000001000a15b4 in restore_svalue (svp=0x101b41e40, pt=0x7fff5fbfbc68, delimiter=44 ',') at object.c:8330 cp = 0x101b5d507 "([F_UID" 0000010 0x00000001000a2868 in restore_mapping (svp=0x101b41ea0, str=0x7fff5fbfbc68) at object.c:7430 z = (mapping_t *) 0x101b49040 key = { type = 0, x = { exponent = -26192, closure_type = -26192, quotes = -26192, num_arg = -26192, extern_args = -26192, generic = -26192 }, u = { str = 0x10101ccd8, charp = 0x10101ccd8 "\003", number = 4311862488, ob = 0x10101ccd8, vec = 0x10101ccd8, strct = 0x10101ccd8, map = 0x10101ccd8, lambda = 0x10101ccd8, mantissa = 4311862488, cb = 0x10101ccd8, generic = 0x10101ccd8, lvalue = 0x10101ccd8, protected_lvalue = 0x10101ccd8, protected_char_lvalue = 0x10101ccd8, protected_range_lvalue = 0x10101ccd8, error_handler = 0x10101ccd8 } } data = (svalue_t *) 0x101b41e50 i = 0 tmp_par = { str = 0x101b5d95a ",\"GUILD.magie_sp\":([\"2ab8fcc56cf505567837f5a565c51760\":([\"F_UID\":\"GUILD.magie_sp\",\"F_CLI\":\"konzentriere\",\"F_MSG\":\"Numeric overflow: 1235742139 + 1235742515\\n\",\"F_OBJ\":\"spellbooks/magie_sp\",\"F_TYPE\":1,"..., num_values = 1 } siz = 0 0000011 0x00000001000a15b4 in restore_svalue (svp=0x101b41ea0, pt=0x7fff5fbfbc68, delimiter=44 ',') at object.c:8330 cp = 0x101b5d4e2 "([8d0dafe4d88b33055fe33bf6444d2cb5" 0000012 0x00000001000a2868 in restore_mapping (svp=0x101028000, str=0x7fff5fbfbc68) at object.c:7430 z = (mapping_t *) 0x101018aa0 key = { type = 0, x = { exponent = 21232, closure_type = 21232, quotes = 21232, num_arg = 21232, extern_args = 21232, generic = 21232 }, u = { str = 0x101ae2978, charp = 0x101ae2978 "\005", number = 4323158392, ob = 0x101ae2978, vec = 0x101ae2978, strct = 0x101ae2978, map = 0x101ae2978, lambda = 0x101ae2978, mantissa = 4323158392, cb = 0x101ae2978, generic = 0x101ae2978, lvalue = 0x101ae2978, protected_lvalue = 0x101ae2978, protected_char_lvalue = 0x101ae2978, protected_range_lvalue = 0x101ae2978, error_handler = 0x101ae2978 } } data = (svalue_t *) 0x101b41eb0 i = 0 tmp_par = { str = 0x101b6064a ",2:([\"wurzel\":([\"c0241c77a1f505027d6d323292ad0e4f\":([\"F_UID\":\"wurzel\",\"F_MSG\":\"Call from destructed object 'players/wurzel/obj/aids#4828017' ignored.\\n\",\"F_OBJ\":\"/players/wurzel/obj/aids#4828017\",\"F_T"..., num_values = 1 } siz = 6 0000013 0x00000001000a15b4 in restore_svalue (svp=0x101028000, pt=0x7fff5fbfbc68, delimiter=44 ',') at object.c:8330 cp = 0x101b5104b "([rimus" #14 0x00000001000a2868 in restore_mapping (svp=0x1010240d0, str=0x7fff5fbfbc68) at object.c:7430 z = (mapping_t *) 0x101018b10 key = { type = 0, x = { exponent = 2, closure_type = 2, quotes = 2, num_arg = 2, extern_args = 2, generic = 2 }, u = { str = 0x1, charp = 0x1 <Address 0x1 out of bounds>, number = 1, ob = 0x1, vec = 0x1, strct = 0x1, map = 0x1, lambda = 0x1, mantissa = 1, cb = 0x1, generic = 0x1, lvalue = 0x1, protected_lvalue = 0x1, protected_char_lvalue = 0x1, protected_range_lvalue = 0x1, error_handler = 0x1 } } data = (svalue_t *) 0x101028010 i = 0 tmp_par = { str = 0x101ba1eb3 "\n", num_values = 1 } siz = 3 #15 0x00000001000a15b4 in restore_svalue (svp=0x1010240d0, pt=0x7fff5fbfbc68, delimiter=10 '\n') at object.c:8330 cp = 0x101b51047 "([1:([rimus" #16 0x00000001000a3b38 in f_restore_object (sp=0x100171000) at object.c:9004 v = (svalue_t *) 0x1010240d0 pt = 0x101b5d8ac "\"8d0dafe4d88b33055fe33bf6444d2cb5\",\"F_MODSTAMP\":1234487099,\"F_LOADNAME\":\"/d/wald/seleven/nelfen/npc/bewohner/fuerst\",\"F_READSTAMP\":1236199850,\"F_CREATESTAMP\":1234487099,]),]),\"GUILD.magie_sp\":([\"2ab8f"... restored_version = 1 name = 0x101031ad8 "secure/ARCH/errord.o" file = 0x101018c7a "/secure/ARCH/errord" lineno = 2 var = (string_t *) 0x101028108 buff = 0x101b51040 "errors" cur = 0x101b51040 "errors" space = 0x101b51046 "" ob = (object_t *) 0x101b0ee88 len = 18 f = (FILE *) 0x7fff700754d8 st = { st_dev = 234881029, st_ino = 13515213, st_mode = 33184, st_nlink = 1, st_uid = 1000, st_gid = 1000, st_rdev = 0, st_atimespec = { tv_sec = 1236713868, tv_nsec = 0 }, st_mtimespec = { tv_sec = 1236681948, tv_nsec = 0 }, st_ctimespec = { tv_sec = 1236708856, tv_nsec = 0 }, st_size = 331399, st_blocks = 648, st_blksize = 4096, st_flags = 0, st_gen = 0, st_lspare = 0, st_qspare = {0, 0} } arg = (svalue_t *) 0x100170ff0 var_rest = 3 num_var = 3 rover = (variable_t *) 0x101b0eda0 rcp = (restore_cleanup_t *) 0x101018bf0 ctx = (struct restore_context_s *) 0x101027f88 nesting = 1 #17 0x0000000100055d9d in eval_instruction (first_instruction=0x101b0ed2a "?\003\034\003Q\\\n", initial_sp=0x100170fe0) at interpret.c:8103 code = 68 pc = (bytecode_p) 0x101b0ed34 "k\037\020?" fp = (svalue_t *) 0x100170ff0 sp = (svalue_t *) 0x100170ff0 num_arg = -1 instruction = 296 full_instr = 296 expected_stack = (svalue_t *) 0x0 ap = (svalue_t *) 0x100170ff0 use_ap = false off_tab = {0, 8, 24, 56, 120, 248, 504, 1016, 2040, 4088, 8184, 16376, 32760, 65528, 131064, 262136, 524280, 1048568, 2097144, 4194296} #18 0x000000010006e28f in apply_low (fun=0x101027088, ob=0x101b0ee88, num_arg=1, b_ign_prot=true, allowRefs=false) at interpret.c:16954 flags = 24 funstart = (fun_hdr_p) 0x101b0ed28 "" fx = 0 progp = (program_t *) 0x101b0ec60 save_csp = (struct control_stack *) 0x1001905c0 ix = 29065 #19 0x000000010006e449 in int_apply (fun=0x101027088, ob=0x101b0ee88, num_arg=1, b_ign_prot=true, b_use_default=true) at interpret.c:17032 No locals. #20 0x000000010006e901 in sapply_int (fun=0x101027088, ob=0x101b0ee88, num_arg=1, b_find_static=true, b_use_default=true) at interpret.c:17193 expected_sp = (svalue_t *) 0x100170fe0 #21 0x000000010009606a in reset_object (ob=0x101b0ee88, arg=5) at object.c:899 No locals. #22 0x00000001000dcef9 in load_object (lname=0x10042a980 "secure/errord", create_super=false, depth=0, isMasterObj=false, chain=0x0) at simulate.c:2152 svp = (svalue_t *) 0x101024100 j = -1 save_current = (object_t *) 0x101ae4878 fd = 5 ob = (object_t *) 0x101b0ee88 save_command_giver = (object_t *) 0x0 i = 12 c_st = { st_dev = 234881029, st_ino = 13515208, st_mode = 33188, st_nlink = 1, st_uid = 1000, st_gid = 1000, st_rdev = 0, st_atimespec = { tv_sec = 1236713853, tv_nsec = 0 }, st_mtimespec = { tv_sec = 1236710176, tv_nsec = 0 }, st_ctimespec = { tv_sec = 1236710176, tv_nsec = 0 }, st_size = 831, st_blocks = 8, st_blksize = 4096, st_flags = 0, st_gen = 0, st_lspare = 0, st_qspare = {0, 0} } name_length = 13 name = 0x10100dee8 "/secure/errord" fname = 0x10100def8 "secure/errord.c" prog = (program_t *) 0x101b0ec60 nlink = { prev = 0x0, name = 0x10100dee9 "secure/errord" } #23 0x00000001000dd7fc in lookfor_object (str=0x101ae0c38, bLoad=true) at simulate.c:2420 ob = (object_t *) 0x0 pName = 0x10042a980 "secure/errord" isMasterObj = false #24 0x00000001000e1a0e in f_load_object (sp=0x100170fd0) at simulate.c:4493 ob = (object_t *) 0x200000000 #25 0x0000000100055d9d in eval_instruction (first_instruction=0x101b0c5c6 "\036", initial_sp=0x100170fc0) at interpret.c:8103 code = 36 pc = (bytecode_p) 0x101b0c5ca "?b\\\031" fp = (svalue_t *) 0x100170fb0 sp = (svalue_t *) 0x100170fd0 num_arg = -1 instruction = 264 full_instr = 264 expected_stack = (svalue_t *) 0x0 ap = (svalue_t *) 0x100170fb0 use_ap = false off_tab = {0, 8, 24, 56, 120, 248, 504, 1016, 2040, 4088, 8184, 16376, 32760, 65528, 131064, 262136, 524280, 1048568, 2097144, 4194296} #26 0x00000001000d9484 in catch_instruction (flags=0, offset=5, i_sp=0x10046f350, i_pc=0x101b0c5c6 "\036", i_fp=0x100170fb0, reserve_cost=4000, i_context=0x0) at simulate.c:449 rc = false old_out_of_memory = false new_pc = (bytecode_p) 0x101b0c5cb "b\\\031" #27 0x00000001000582f1 in eval_instruction (first_instruction=0x101b0c5c2 "a\037", initial_sp=0x100170fb0) at interpret.c:9511 offset = 5 flags = 0 reserve_cost = 4000 pc = (bytecode_p) 0x101b0c5c6 "\036" fp = (svalue_t *) 0x100170fb0 sp = (svalue_t *) 0x100170fc0 num_arg = -1 instruction = 31 full_instr = 31 expected_stack = (svalue_t *) 0x0 ap = (svalue_t *) 0x100170fd0 use_ap = false off_tab = {0, 8, 24, 56, 120, 248, 504, 1016, 2040, 4088, 8184, 16376, 32760, 65528, 131064, 262136, 524280, 1048568, 2097144, 4194296} #28 0x000000010006e28f in apply_low (fun=0x101004898, ob=0x101ae4878, num_arg=1, b_ign_prot=true, allowRefs=false) at interpret.c:16954 flags = 16777392 funstart = (fun_hdr_p) 0x101b0c5c0 "\001" fx = 8 progp = (program_t *) 0x101b0c460 save_csp = (struct control_stack *) 0x1001904c0 ix = 18842 #29 0x000000010006e449 in int_apply (fun=0x101004898, ob=0x101ae4878, num_arg=1, b_ign_prot=true, b_use_default=false) at interpret.c:17032 No locals. #30 0x000000010006e901 in sapply_int (fun=0x101004898, ob=0x101ae4878, num_arg=1, b_find_static=true, b_use_default=false) at interpret.c:17193 expected_sp = (svalue_t *) 0x100170fa0 #31 0x000000010006f326 in apply_master_ob (fun=0x101004898, num_arg=1, external=false) at interpret.c:17503 reserve_used = false error_recovery_info = { rt = { last = 0x100140700, type = 2 }, flags = 1606413488, con = { text = {1511344, 1, 1606413664, 32767, 1606413424, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 455262, 1, 530, 0, 8112, 1606353791, 0, 32767, 1, 1572864, 1, 0, 0, 28199032, 1, 1606413712, 32767, 28199032, 1, 16904192, 1, 1606413632, 32767} } } save_sp = (svalue_t *) 0x100170fb0 save_csp = (struct control_stack *) 0x100190440 result = (svalue_t *) 0x10000e6fb eval_cost_reserve = 1024 #32 0x000000010000e65e in preload_objects (eflag=0) at backend.c:1293 prefiles = (vector_t *) 0x1010249c0 ret = (svalue_t *) 0x100136e00 ix = 0 ix0 = 0 num_prefiles = 1 #33 0x0000000100082333 in main (argc=4, argv=0x7fff5fbff250) at main.c:630 i = 5 p = 0x7fff5fbff1f4 "\005" set = 8192 rc = 0 Trace dump: secure/master secure/master.c line 144 0x101b0c87a: 10 0 cstring0 (0: -1) line 144 0x101b0c87c: 24 return (1: 0) 0x101b0c52a: 10 0 cstring0 (0: 0) line 8 0x101b0c52c: 309 81 seteuid (1: 1) 0x101b0c52e: 92 pop_value (1: 1) 0x101b0c52f: 18 19 clit (0: 0) line 9 0x101b0c531: 10 1 cstring0 (1: 1) 0x101b0c533: 366 36 set_driver_hook (2: 2) line 16 0x101b0c535: 18 12 clit (0: 0) line 17 0x101b0c537: 10 2 cstring0 (1: 1) 0x101b0c539: 10 3 cstring0 (2: 2) 0x101b0c53b: 10 4 cstring0 (3: 3) 0x101b0c53d: 166 3 aggregate (4: 4) 0x101b0c540: 366 36 set_driver_hook (2: 2) 0x101b0c542: 18 6 clit (0: 0) line 18 0x101b0c544: 10 5 cstring0 (1: 1) 0x101b0c546: 366 36 set_driver_hook (2: 2) 0x101b0c548: 18 5 clit (0: 0) line 19 0x101b0c54a: 10 5 cstring0 (1: 1) 0x101b0c54c: 366 36 set_driver_hook (2: 2) 0x101b0c54e: 18 4 clit (0: 0) line 20 0x101b0c550: 10 6 cstring0 (1: 1) 0x101b0c552: 366 36 set_driver_hook (2: 2) 0x101b0c554: 18 2 clit (0: 0) line 21 0x101b0c556: 184 no_warn_deprecated (1: 1) 0x101b0c557: 22 2 closure (1: 1) 0x101b0c55c: 366 36 set_driver_hook (2: 2) 0x101b0c55e: 97 save_arg_frame (0: 0) line 23 0x101b0c55f: 10 7 cstring0 (1: 1) 0x101b0c561: 292 64 quote (2: 2) 0x101b0c563: 15 const0 (2: 2) 0x101b0c564: 374 44 symbol_function (3: 3) 0x101b0c566: 10 8 cstring0 (2: 2) 0x101b0c568: 411 21 funcall (3: 3) 0x101b0c56a: 98 restore_arg_frame (2: 2) 0x101b0c56b: 106 branch_when_zero (1: 1) 0x101b0c57e: 25 return0 (0: 0) line 24 secure/master program deallocated line 0 0x7fff5fbfecf0: 392 0 allocate (1: 0) line 0 0x7fff5fbfecf2: 24 return (1: 0) secure/master secure/master.c line 29 0x101b0c59a: 10 0 cstring0 (0: 0) line 29 0x101b0c59c: 309 81 seteuid (1: 1) 0x101b0c59e: 92 pop_value (1: 1) 0x101b0c59f: 10 10 cstring0 (0: 0) line 31 0x101b0c5a1: 166 1 aggregate (1: 1) 0x101b0c5a4: 24 return (1: 1) 0x101b0c5c2: 97 save_arg_frame (0: 0) line 35 0x101b0c5c3: 31 1280 catch (1: 1) 0x101b0c5c6: 30 0 local (1: 1) 0x101b0c5c8: 264 load_object (2: 2) 0x101b0c8e2: 97 save_arg_frame (0: 5) line 150 0x101b0c8e3: 30 0 local (1: 6) 0x101b0c8e5: 171 previous_object0 (2: 7) 0x101b0c8e6: 110 call_function (3: 8) 0x101b0c7e2: 96 514 clear_locals (0: 10) line 114 0x101b0c7e5: 30 0 local (0: 10) line 117 0x101b0c7e7: 201 stringp (1: 11) 0x101b0c7e8: 60 ! (1: 11) 0x101b0c7e9: 39 4 || (1: 11) 0x101b0c7eb: 30 1 local (0: 10) 0x101b0c7ed: 196 objectp (1: 11) 0x101b0c7ee: 60 ! (1: 11) 0x101b0c7ef: 106 branch_when_zero (1: 11) 0x101b0c7f3: 97 save_arg_frame (0: 10) line 120 0x101b0c7f4: 30 0 local (1: 11) 0x101b0c7f6: 110 call_function (2: 12) 0x101b0c5ea: 96 769 clear_locals (0: 16) line 39 0x101b0c5ed: 30 0 local (0: 16) line 42 0x101b0c5ef: 196 objectp (1: 17) 0x101b0c5f0: 106 branch_when_zero (1: 17) 0x101b0c601: 30 0 local (0: 16) line 44 0x101b0c603: 201 stringp (1: 17) 0x101b0c604: 106 13 branch_when_zero (1: 17) 0x101b0c606: 97 save_arg_frame (0: 16) line 45 0x101b0c607: 30 0 local (1: 17) 0x101b0c609: 15 const0 (2: 18) 0x101b0c60a: 110 call_function (3: 19) secure/master secure/master/file_access.c line 6 0x10103f9f2: 96 514 clear_locals (0: 22) line 6 0x10103f9f5: 30 0 local (0: 22) line 9 0x10103f9f7: 107 branch_when_non_zero (1: 23) 0x10103f9fe: 30 0 local (0: 22) line 11 0x10103fa00: 15 const0 (1: 23) 0x10103fa01: 184 no_warn_deprecated (2: 24) 0x10103fa02: 61 index (2: 24) 0x10103fa03: 28 switch (1: 23) 0x10103faaa: 30 1 local (0: 22) line 29 0x10103faac: 38 -12543 && (1: 23) 0x10103faaf: 38 && (1: 23) 0x10103fab7: 38 && (1: 23) 0x10103fac1: 106 branch_when_zero (1: 23) 0x10103fae2: 30 0 local (0: 22) line 32 0x10103fae4: 10 0 cstring0 (1: 23) 0x10103fae6: 341 11 explode (2: 24) 0x10103fae8: 10 1 cstring0 (1: 23) 0x10103faea: 10 2 cstring0 (2: 24) 0x10103faec: 166 2 aggregate (3: 25) 0x10103faef: 43 - (2: 24) 0x10103faf0: 123 2 push_local_variable_lvalue (1: 23) 0x10103faf2: 41 (void)= (2: 24) line 33 0x10103faf3: 27 break (0: 22) 0x10103fb1a: 105 branch (0: 22) line 34 0x10103fb30: 97 save_arg_frame (0: 22) 0x10103fb31: 30 2 local (1: 23) 0x10103fb33: 10 7 cstring0 (2: 24) 0x10103fb35: 427 37 member (3: 25) 0x10103fb37: 98 restore_arg_frame (2: 24) 0x10103fb38: 123 3 push_local_variable_lvalue (1: 23) 0x10103fb3a: 40 = (2: 24) 0x10103fb3b: 17 nconst1 (1: 23) 0x10103fb3c: 52 != (2: 24) 0x10103fb3d: 109 34 bbranch_when_non_zero (1: 23) 0x10103fb3f: 30 2 local (0: 22) line 36 0x10103fb41: 24 return (1: 23) secure/master secure/master.c line 45 0x101b0c60d: 98 restore_arg_frame (2: 18) line 45 0x101b0c60e: 123 1 push_local_variable_lvalue (1: 17) 0x101b0c610: 41 (void)= (2: 18) 0x101b0c611: 105 403376643 branch (0: 16) line 46 0x101b0c616: 30 1 local (0: 16) line 48 0x101b0c618: 200 sizeof (1: 17) 0x101b0c619: 123 3 push_local_variable_lvalue (1: 17) 0x101b0c61b: 41 (void)= (2: 18) 0x101b0c61c: 30 3 local (0: 16) line 49 0x101b0c61e: 18 2 clit (1: 17) 0x101b0c620: 49 < (2: 18) 0x101b0c621: 106 403376643 branch_when_zero (1: 17) 0x101b0c626: 30 1 local (0: 16) line 51 0x101b0c628: 15 const0 (1: 17) 0x101b0c629: 184 no_warn_deprecated (2: 18) 0x101b0c62a: 61 index (2: 18) 0x101b0c62b: 28 switch (1: 17) 0x101b0c6ed: 10 0 cstring0 (0: 16) line 78 0x101b0c6ef: 24 return (1: 17) line 82 0x101b0c7f9: 98 restore_arg_frame (2: 12) line 120 0x101b0c7fa: 123 2 push_local_variable_lvalue (1: 11) 0x101b0c7fc: 40 = (2: 12) 0x101b0c7fd: 107 branch_when_non_zero (1: 11) 0x101b0c801: 30 0 local (0: 10) line 123 0x101b0c803: 15 const0 (1: 11) 0x101b0c804: 18 2 clit (2: 12) 0x101b0c806: 66 .. (3: 13) 0x101b0c807: 10 39 cstring0 (1: 11) 0x101b0c809: 51 == (2: 12) 0x101b0c80a: 39 9 || (1: 11) 0x101b0c80c: 30 0 local (0: 10) 0x101b0c80e: 15 const0 (1: 11) 0x101b0c80f: 18 3 clit (2: 12) 0x101b0c811: 66 .. (3: 13) 0x101b0c812: 10 40 cstring0 (1: 11) 0x101b0c814: 51 == (2: 12) 0x101b0c815: 106 branch_when_zero (1: 11) 0x101b0c819: 30 2 local (0: 10) line 126 0x101b0c81b: 10 0 cstring0 (1: 11) 0x101b0c81d: 51 == (2: 12) 0x101b0c81e: 38 4 && (1: 11) 0x101b0c820: 30 1 local (0: 10) 0x101b0c822: 206 this_object (1: 11) 0x101b0c823: 51 == (2: 12) 0x101b0c824: 106 3 branch_when_zero (1: 11) 0x101b0c826: 10 0 cstring0 (0: 10) 0x101b0c828: 24 return (1: 11) 0x101b0c8e9: 98 restore_arg_frame (2: 7) line 150 0x101b0c8ea: 24 return (1: 6) secure/errord secure/errord.c line 23 0x101b0ed2a: 206 this_object (0: 3) line 23 0x101b0ed2b: 256 28 getuid (1: 4) 0x101b0ed2d: 309 81 seteuid (1: 4) 0x101b0ed2f: 92 pop_value (1: 4) 0x101b0ed30: 10 0 cstring0 (0: 3) line 24 0x101b0ed32: 296 restore_object (1: 4) secure/master secure/master/file_access.c line 41 0x10103fb62: 30 0 local (0: 9) line 41 0x10103fb64: 24 return (1: 10) 0x101b0ed34: 107 31 16 168 0 1 18 2 3 ' preload' in ' secure/master.c' (' secure/master') line 35 4120 ' CATCH' in (' secure/master') 4129 ' create' in ' secure/errord.c' (' secure/errord') line 24 | ||||
Tags | No tags attached. | ||||
Attached Files | config.h (20,629 bytes)
/* DO NOT EDIT! * * This file is created automatically by configure from the template * in config.h.in. */ #ifndef CONFIG_H__ #define CONFIG_H__ 1 /* ----------- Commandline Argument Defaults ---------- * These options provide default settings for those options which can * also be set on the commandline. */ /* Define COMPAT_MODE if you are using the 2.4.5 mudlib or one of its * derivatives. */ #undef COMPAT_MODE /* The name of the master object. */ #define MASTER_NAME "secure/master" /* Define ALLOW_FILENAME_SPACES if the driver should accept space characters * in filenames. If it is not defined, a hardcoded test for space characters * is activated. */ #undef ALLOW_FILENAME_SPACES /* --- Runtime limits --- */ /* This is the maximum array size allowed for one single array. * If 0, any size is allowed. */ #define MAX_ARRAY_SIZE 10000 /* This is the maximum number of entries allowed for a single mapping. * If 0, any size is allowed. */ #define MAX_MAPPING_KEYS 30000 /* This is the maximum number of values held in a single mapping. * If 0, any size is allowed. */ #define MAX_MAPPING_SIZE 60000 /* Max size of a file allowed to be read by 'read_file()'. */ #define READ_FILE_MAX_SIZE 200000 /* Define MAX_BYTE_TRANSFER to the number of bytes you allow to be read * and written with read_bytes and write_bytes */ #define MAX_BYTE_TRANSFER 200000 /* This is the maximum number of callouts allowed at one time. * If 0, any number is allowed. */ #define MAX_CALLOUTS 1250 /* Define this to the maximum amount of data * to be held pending for writing per interactive. * A value of 0 means 'unlimited'. */ #define WRITE_BUFFER_MAX_SIZE 100000 /* --- Timing --- */ /* If an object is left alone for a certain time, then the * function clean_up will be called. This function can do anything, * like destructing the object. If the function isn't defined by the * object, then nothing will happen. * * This time should be substantially longer than the swapping time. */ #define TIME_TO_CLEAN_UP 64800 /* How long time until an unused object is swapped out. * Machine with too many players and too little memory: 900 (15 minutes) * Machine with few players and lot of memory: 10000 * Machine with infinite memory: 0 (never swap). */ #define TIME_TO_SWAP 14000 #define TIME_TO_SWAP_VARIABLES 22000 /* How many seconds until an object is reset again. * Set this value high if big system, otherwise low. */ #define TIME_TO_RESET 3600 /* The granularity of alarm() calls. * This is the granularity of the call_outs, * and base granularity of heart_beat, reset und clean_up calls. */ #define ALARM_TIME 2 /* The interval between heart beats. */ #define HEART_BEAT_INTERVAL 2 /* Shall all heart beats happen in the same time frame? * (i.e. only every HEART_BEAT_INTERVAL seconds.) */ #define SYNCHRONOUS_HEART_BEAT /* --- Memory --- */ /* Reserve an extra memory area from malloc(), to free when we run out * of memory to get some warning and start Armageddon. * If this value is 0, no area will be reserved. */ #define RESERVED_USER_SIZE 8500000 #define RESERVED_MASTER_SIZE 500000 #define RESERVED_SYSTEM_SIZE 1000000 /* If MIN_MALLOCED is > 0, the gamedriver will reserve this amount of * memory on startup for large blocks, thus reducing the large block * fragmentation. The value therefore should be a significantly large * multiple of the large chunk size. * As a rule of thumb, reserve enough memory to cover the first couple * of days of uptime. */ #define MIN_MALLOCED 0 /* If MIN_SMALL_MALLOCED is > 0, the gamedriver will reserve this * amount of memory on startup for small blocks, thus reducing the small block * fragmentation. The value therefore should be a significantly large * multiple of the small chunk size. * As a rule of thumb, reserve enough memory to cover the first couple * of days of uptime. */ #define MIN_SMALL_MALLOCED 0 /* This value gives the upper limit for the total allocated memory * (useful for systems with no functioning process limit). * A value of 0 means 'unlimited'. */ #define HARD_MALLOC_LIMIT_DEFAULT 0x7fffffff /* This value gives a soft limit of the allocated memory (kind of low * watermark). If this value is exceeded, the driver will call low_memory() in * the master to inform the mudlib about the (potenntially) developing low * memory situation. * A value of 0 means 'unlimited'. */ #define SOFT_MALLOC_LIMIT_DEFAULT 0 /* --- Random Number Generator (SFMT) --- */ /* Set the period length of the SFMT. * Default is a period length of 2^19937 - 1 */ #define RANDOM_PERIOD_LENGTH 19937 /* --- Interpreter --- */ /* Define STRICT_EUIDS if the driver is to enforce the use of euids, * ie. load_object() and clone_object() require the current object to * have a non-zero euid. */ #define STRICT_EUIDS /* Maximum number of evaluated nodes/loop. * If this is exceeded, the current function is halted. */ #define MAX_COST 1500000 /* Define SHARE_VARIABLES if a clone's variables are to be assigned * from the current blueprint's variables. Undefine it if clones * should be initialized by __INIT(). */ #undef SHARE_VARIABLES /* --- Communication --- */ /* The input escape character. */ #define INPUT_ESCAPE "!" /* Define what port number the game is to use. */ #define PORTNO 4711 /* Define this to the port on which the driver can receive UDP message. * If set to -1, the port will not be opened unless the mud is given a valid * port number on startup with the -u commandline option. */ #define UDP_PORT 4246 /* Maximum numbers of ports the GD accepts connections to. */ #define MAXNUMPORTS 20 /* Should code for the external request demon be included? */ #undef ERQ_DEMON /* Maximum sizes for an erq send or reply. */ #define ERQ_MAX_REPLY 1024 #define ERQ_MAX_SEND 1024 /* Define this if you want IPv6 support (assuming that your host * actually offers this. */ #undef USE_IPV6 /* maximum number of concurrent outgoing connection attempts by net_connect() * (that is connections that are in progress but not fully established yet). */ #define MAX_OUTCONN 10 /* ----------- Compilation Options ---------- * To change these options, the config.h must be recreated and the * driver recompiled. */ /* Trace the most recently executed bytecode instructions? */ #define TRACE_CODE /* If using TRACE_CODE , how many instructions should be kept? */ #define TOTAL_TRACE_LENGTH 4096 /* Runtime statistics: * COMM_STAT: count number and size of outgoing packets. * APPLY_CACHE_STAT: count number of hits and misses in the apply cache. */ #define COMM_STAT #define APPLY_CACHE_STAT /* The name of the swapfile used by the driver to swap out objects (if * enabled), relative to the mudlib directory. The driver will append * '.<hostname>' to the file. */ #define SWAP_FILE "/Volumes/mud/mud/homemud//swapfiles/swapfile" /* --- Memory --- */ /* Which memory manager to use. Possible defines are * MALLOC_smalloc: Satoria's malloc. Fastest, uses the least memory, * supports garbage collection. * MALLOC_slaballoc: Slab allocator. Fastest, reduces fragmentation, * supports garbage collection, not threadsafe. * MALLOC_sysmalloc: the normal system malloc() * MALLOC_ptmalloc: ptmalloc from www.malloc.de - threadsafe. */ #define MALLOC_slaballoc /* Define this to let the memory allocator request memory from the system * directly using sbrk() (assuming the system supports it). * If not defined, the memory allocator will use malloc(). * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ #define MALLOC_SBRK /* Define this to annotate all allocations with a magic word to find * simple misuses of memory (like multiple frees). * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ #define MALLOC_CHECK /* Define this to annotate all allocations with file:line of the driver * source responsible for it. */ #define MALLOC_TRACE /* Define this to annotate all allocations with file:line of the lpc program * responsible for it. */ #define MALLOC_LPC_TRACE /* Define this to log all calls to esbrk() (the system memory allocator). * Works best if MALLOC_TRACE is defined. * This define is useful if your mud keeps growing in total memory size * instead of re-using the memory already allocated. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ #undef MALLOC_SBRK_TRACE /* --- Wizlist --- */ /* Where to save the WIZLIST information. * If not defined, and neither given on the commandline, the driver will * not read the WIZLIST file. */ #define WIZLIST_FILE "WIZLIST" /* --- Access Control --- */ /* file for access permissions data. * Don't define this if you don't want the driver to do any access control. */ #undef ACCESS_FILE /* logfile to show valid and rejected connections * simple not define this for NO logs */ #undef ACCESS_LOG /* --- Language --- */ /* Define USE_PARSE_COMMAND if you want the efun parse_command(). */ #undef USE_PARSE_COMMAND /* Define USE_SET_LIGHT if you want the efun set_light() and the * simple 2.4.5 light system. */ #undef USE_SET_LIGHT /* Define USE_SET_IS_WIZARD if you want the efun set_is_wizard(). */ #define USE_SET_IS_WIZARD /* Define USE_PROCESS_STRING if you want the efun process_string(). */ #define USE_PROCESS_STRING /* Define USE_SYSTEM_CRYPT if you want crypt() to be implemented by your * operating system (assuming it offers this function). This makes your * programm smaller and may even let you take advantage of improvements * of your OS, but may also prohibit transporting encrypted date like * passwords between different systems. * Undefine USE_SYSTEM_CRYPT if you want to use the driver's portable * crypt() implementation. */ #define USE_SYSTEM_CRYPT /* Define this if you want MCCP (Mud Control Compression Protocol). */ #undef USE_MCCP /* Define this if you want TLS (Transport Layer Security) over Telnet. */ #undef USE_TLS /* Define this if you want mySQL support (assuming that your host * actually offers this. */ #undef USE_MYSQL /* Define this if you want PostgreSQL support (assuming that your host * actually offers this. */ #undef USE_PGSQL /* Define this if you want SQLite support (assuming that your host * actually offers this. */ #undef USE_SQLITE /* Define this if you want alist support. */ #define USE_ALISTS /* Define this if you want to allow call_other()s on arrays of objects. */ #define USE_ARRAY_CALLS /* Define this if you want PCRE instead of traditional regexps. */ #undef USE_PCRE /* Define this if you want to use builtin PCRE (ignored when PCRE * is disabled as a whole). */ #undef USE_BUILTIN_PCRE /* Define this if you want iksemel library support. */ #undef USE_IKSEMEL /* Define this if you want the obsolete and deprecated efuns. */ #undef USE_DEPRECATED /* --- Runtime limits --- */ /* Maximum size of a socket send buffer. */ #define SET_BUFFER_SIZE_MAX 65536 /* CATCH_RESERVED_COST is the default value added to the eval cost for the * time executing code guarded by a catch() statement, so that an * eval_cost-too-big error can still be caught and handled. * * To catch an eval_cost too big error in an object that called recursive * master functions, CATCH_RESERVED_COST should be greater than * MASTER_RESERVED_COST. */ #define CATCH_RESERVED_COST 4000 /* MASTER_RESERVED_COST is the total reserve available for master applies. * It is halved for every recursion into another master apply. */ #define MASTER_RESERVED_COST 1024 /* must be power of 2 */ /* TODO: Check that at runtime */ /* If this is defined, expensive operations like string additions * receive additional evalcosts depending on the amount of data handled. */ #define DYNAMIC_COSTS /* Show the evaluation costs in the stacktrace. */ #define EVAL_COST_TRACE /* Define the maximum stack size of the stack machine. This stack will also * contain all local variables and arguments. */ #define EVALUATOR_STACK_SIZE 4000 /* Define the maximum call depth for functions. * MAX_USER_TRACE is used for for normal program execution, the full * MAX_TRACE is only available in error handling. * * MAX_TRACE must be larger than MAX_USER_TRACE (check at compile time). */ #define MAX_USER_TRACE 120 #define MAX_TRACE 125 /* Maximum number of bits in a bit field. They are stored in printable * strings, 6 bits per byte. * The limit is more based on considerations of speed than memory * consumption. */ #define MAX_BITS 6144 /* Maximum number of players in the game. */ #define MAX_PLAYERS 225 /* When uploading files, we want fast response; however, normal players * shouldn't be able to hog the system in this way. Define ALLOWED_ED_CMDS * to be the ratio of the no of ed cmds executed per player cmd. */ #define ALLOWED_ED_CMDS 20 /* TODO: ALLOWED_ED_CMDS: make this a runtime option */ /* Limit the amount of recursion in the PCRE code. Setting it to low will * prevent certain regexps to be executed properly, setting it too high can * cause that regexps to crash the driver. Set it according to the * available maximum stack size for the driver process. (Rule of thumb: * The memory used for a recursion on the stack seems to be within 466 and * 1008 bytes. If you have 8M of stack size, reserve half of it for LPC * recursions and choose about 3000 - 4000.) In doubt, increase the stack * size limit for the driver process with ulimit & Co.) * Defaults to 3000 */ #define LD_PCRE_RECURSION_LIMIT 3000 /* The maximum length of the buffer for commands. The maximum length of a * command will be MAX_COMMAND_LENGTH - 1. */ #define MAX_COMMAND_LENGTH 1000 /* --- Compiler --- */ /* Define the size of the compiler stack. This defines how complex * expressions the compiler can parse. The value should be big enough. */ #define COMPILER_STACK_SIZE 400 /* Max number of local variables in a function. */ #define MAX_LOCAL 30 /* Maximum size of an expanded preprocessor definition. */ #define DEFMAX 65000 /* --- Internal Tables --- */ /* Define the size of the shared string hash table. This number needn't * be prime, probably between 1000 and 30000; if you set it to about 1/5 * of the number of distinct strings you have, you will get a hit ratio * (number of comparisons to find a string) very close to 1, as found strings * are automatically moved to the head of a hash chain. You will never * need more, and you will still get good results with a smaller table. * If the size is a power of two, hashing will be faster. */ #define HTABLE_SIZE 65536 /* Object hash table size. * Define this like you did with the strings; probably set to about 1/4 of * the number of objects in a game, as the distribution of accesses to * objects is somewhat more uniform than that of strings. */ #define OTABLE_SIZE 65536 /* Define the size of the ident_table. It contains all global identifiers * (efuns and permanent defines) as well as the identifiers of a compiled * program which are removed from the ident_table after compilation. * Must be within 256 and the maximum of a short (SHRT_MAX, usually 32768). */ #define ITABLE_SIZE 512 /* the number of apply_low cache entries will be 2^APPLY_CACHE_BITS. */ #define APPLY_CACHE_BITS 16 /* The parameters of the regular expression/result cache. * The expression cache uses a hashtable of RXCACHE_TABLE entries. * Undefine RXCACHE_TABLE to disable the all regexp caching. */ #define RXCACHE_TABLE 8192 /* --- Current Developments --- * These options can be used to disable developments-in-progress if their * code turns out to be interrrupting. */ /* Define this if you want structs supported. */ #define USE_STRUCTS /* Define this if you want the new inline closure syntax supported. * (f-020528). */ #define USE_NEW_INLINES /* --- Profiling --- * For profiling of the VM instruction implementations, refer to the Makefile */ /* Enable usage statistics of VM instructions. * For profiling of the VM instructions themselves, see the Profiling * Options in the Makefile. */ #undef OPCPROF #ifdef OPCPROF /* With OPCPROF, the dump of the statistics include the names * of the instructions. */ #undef VERBOSE_OPCPROF #endif /* --- Standard Debugging --- */ /* Enable basic run time sanity checks. This will use more time * and space, but nevertheless you are strongly encouraged to keep * it defined. */ #define DEBUG /* Enable debug output from the LPC compiler. */ #undef YYDEBUG /* Disable inlining. */ #undef NO_INLINES /* Activate debug prints in the telnet machine. */ #undef DEBUG_TELNET /* Activate allocation debug prints in the malloc module. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ #undef DEBUG_MALLOC_ALLOCS /* The DEBUG level for the ERQ daemon: * 0 : no debug output * 1 : standard debug output * 2 : verbose debug output */ #define ERQ_DEBUG 0 /* --- Specific Debugging --- * These options have been introduced to debug specific problems and will * be removed again later. */ /* Enable the automatic data cleanup from the backend. * TODO: Remove this macro once it is proven stable. */ #define NEW_CLEANUP /* Log the details of the automatic data cleanup for each individual object. * This is useful if the cleanup is suspected to hog the CPU. * TODO: Remove this macro once it is proven stable. */ #undef LOG_NEW_CLEANUP /* Log the details of the automatic data cleanup of all objects. This is * useful if the cleanup is suspected to hog the CPU. * TODO: Remove this macro once it is proven stable. */ #define LOG_NEW_CLEANUP_ALL /* Enable the use of freelists in the malloc AVL nodes. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove this macro once it is proven stable or if the change * TODO:: didn't bring any advantages.. */ #define USE_AVL_FREELIST /* Order malloc large block freelists by address. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove if it doesn't help with the fragmentation, as it uses up * TODO:: a small, but measurable amount of time in the allocator. */ #define MALLOC_ORDER_LARGE_FREELISTS /* Order slaballoc partial-slab freelists by number of free blocks. * Supported by: MALLOC_slaballoc. * TODO: Remove if it doesn't help with the fragmentation, as it uses up * TODO:: a small, but measurable amount of time in the allocator. */ #define MALLOC_ORDER_SLAB_FREELISTS /* Allow slaballoc to use multiples of DESIRED_SLAB_SIZE when creating * new slabs. */ #define SLABALLOC_DYNAMIC_SLABS /* Collect extended malloc statistics. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove this macro or make it configurable. */ #define MALLOC_EXT_STATISTICS /* Collected statistics about string comparisons. * TODO: Remove this macro after we got our data. */ #define EXT_STRING_STATS /* Trace changes to the tot_alloc_object and tot_alloc_object_size * statistics, in order to find the status bugs (enables commandline * option --check-object-stat). Will produce a decent amount of * output on stderr. */ #undef CHECK_OBJECT_STAT /* Activate total mapping size consistency check code. It has a small * impact on the execution speed. This define was used to find * the inaccuracy in the mapping statistic. */ #undef CHECK_MAPPING_TOTAL /* Activate object refcount check code. It will produce a decent * amount of log output. It will also fatal() the driver as soon * as it detects an inconsistency in the list of destructed objects. */ #undef CHECK_OBJECT_REF /* Activate object referencing checking code during the GC. It will * print error messages to gcout when an object or program is * referenced as something else. No penalty for using. * Requires MALLOC_TRACE to work. Incompatible with DUMP_GC_REFS. */ #ifdef MALLOC_TRACE #define CHECK_OBJECT_GC_REF #endif /* Sometimes the GC stumbles over invalid references to memory * blocks (namely 'Program referenced as something else'). Define * this macro to get a detailed dump of all found references * (Warning: LOTS of output!). Incompatible with CHECK_OBJECT_GC_REF. */ #undef DUMP_GC_REFS #endif /* CONFIG_H__ */ machine.h (13,611 bytes)
/* machine.h. Generated from machine.h.in by configure. */ /* machine.h.in. Generated from configure.in by autoheader. */ #ifndef MACHINE_H #define MACHINE_H /* A mask that allows to extract an unsigned char from a signed */ #define CHARBIT_MASK 0xff /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* define the erq include file. */ /* #undef ERQ_INCLUDE */ /* The following is needed for smalloc without SBRK_OK to use memory efficiently. smalloc will malloc blocks that are a large power of two, minus EXTERN_MALLOC_OVERHEAD. If you have no idea what number to choose, compile & run util/overhead.c */ #define EXTERN_MALLOC_OVERHEAD 0 /* does free() have void as its returntype? */ #define FREE_RETURNS_VOID 1 /* If so, is it restricted to user and system time? */ /* #undef GETRUSAGE_RESTRICTED */ /* Is it available as a subfunction of syscall()? */ /* #undef GETRUSAGE_VIA_SYSCALL */ /* Does the machine offer GnuTLS? */ /* #undef HAS_GNUTLS */ /* version of GNUTLS library */ /* #undef HAS_GNUTLS_VERSION */ /* Does the machine offer iconv? */ /* #undef HAS_ICONV */ /* Does the machine's iconv take a non-const 'char**' as first arg? */ #define HAS_ICONV_NONCONST_IN 1 /* Does the machine offer IDNA? */ /* #undef HAS_IDN */ /* Does the machine offer iksemel? */ /* #undef HAS_IKSEMEL */ /* Does the compiler provide inline functions? */ #define HAS_INLINE 1 /* Does the machine offer IPv6? */ #define HAS_IPV6 1 /* Does the machine offer mySQL? */ /* #undef HAS_MYSQL */ /* Does the machine offer OpenSSL/SSL? */ #define HAS_OPENSSL 1 /* Does the machine offer PCRE? */ /* #undef HAS_PCRE */ /* Does the machine offer PostgreSQL? */ /* #undef HAS_PGSQL */ /* Does the machine offer SQLite3? */ #define HAS_SQLITE3 1 /* Define to 1 if you have the `alarm' function. */ #define HAVE_ALARM 1 /* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define to 1 if you have the <bstring.h> header file. */ /* #undef HAVE_BSTRING_H */ /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 /* Define to 1 if you have the `crypt' function. */ #define HAVE_CRYPT 1 /* Define to 1 if you have the <crypt.h> header file. */ /* #undef HAVE_CRYPT_H */ /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `fchmod' function. */ #define HAVE_FCHMOD 1 /* Define to 1 if you have the `fcntl' function. */ #define HAVE_FCNTL 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the `getdomainname' function. */ #define HAVE_GETDOMAINNAME 1 /* Does the system have a getrusage call? */ #define HAVE_GETRUSAGE 1 /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if the system has the type `intmax_t'. */ #define HAVE_INTMAX_T 1 /* Define to 1 if the system has the type `intptr_t'. */ #define HAVE_INTPTR_T 1 /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the <libc.h> header file. */ #define HAVE_LIBC_H 1 /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #undef HAVE_LIBNSL */ /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if the system has the type `long double'. */ #define HAVE_LONG_DOUBLE 1 /* Define to 1 if the type `long double' works and has more range or precision than `double'. */ #define HAVE_LONG_DOUBLE_WIDER 1 /* Define to 1 if the system has the type `long long int'. */ #define HAVE_LONG_LONG_INT 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the `memmem' function. */ /* #undef HAVE_MEMMEM */ /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ /* Define to 1 if you have the <netdb.h> header file. */ #define HAVE_NETDB_H 1 /* Define to 1 if you have the `poll' function. */ #define HAVE_POLL 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #define HAVE_STRINGIZE 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 /* Define to 1 if you have the `sysconf' function. */ #define HAVE_SYSCONF 1 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. */ /* #undef HAVE_SYS_DIR_H */ /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/rusage.h> header file. */ /* #undef HAVE_SYS_RUSAGE_H */ /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/termios.h> header file. */ #define HAVE_SYS_TERMIOS_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `trunc' function. */ #define HAVE_TRUNC 1 /* Define to 1 if typeof works with your compiler. */ #define HAVE_TYPEOF 1 /* Define to 1 if the system has the type `uintmax_t'. */ #define HAVE_UINTMAX_T 1 /* Define to 1 if the system has the type `uintptr_t'. */ #define HAVE_UINTPTR_T 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `unsigned long long int'. */ #define HAVE_UNSIGNED_LONG_LONG_INT 1 /* Define to 1 if you have the `wait3' function. */ #define HAVE_WAIT3 1 /* Define to 1 if you have the `waitpid' function. */ #define HAVE_WAITPID 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Define to 1 if you have the `_crypt' function. */ /* #undef HAVE__CRYPT */ /* define the host-specific include file */ /* #undef HOST_INCLUDE */ /* Is the library function inet_ntoa() compatible with the compiler? */ #define INET_NTOA_OK 1 /* word alignment */ #define MALLOC_ALIGN 8 /* Define if you have bcopy, and it handles overlapping ranges correctly. */ #define OVERLAPPING_BCOPY 1 /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "" /* Define to the version of this package. */ #define PACKAGE_VERSION "" /* what kind of pointer is used by malloc() et al */ #define POINTER void * /* Can rename handle directories? */ #define RENAME_HANDLES_DIRECTORIES 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Set in response to the signal handler return type, since not all compilers understand direct definition comparisons. */ #define RETSIGTYPE_VOID 1 /* Can ru_utime / ru_stime be accessed as a timeval with tv_sec and tv_usec? */ #define RUSAGE_USEC 1 /* can we define our own malloc() safely? */ /* #undef SBRK_OK */ /* The size of `char *', as computed by sizeof. */ #define SIZEOF_CHAR_P 8 /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of `intmax_t', as computed by sizeof. */ #define SIZEOF_INTMAX_T 8 /* The size of `intptr_t', as computed by sizeof. */ #define SIZEOF_INTPTR_T 8 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 /* The size of `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 /* Does SQLite3 use pthreads? */ /* #undef SQLITE3_USES_PTHREADS */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* the atari strtol() used to consider characters '9' < c < 'A' to be numeric */ /* #undef STRTOL_BROKEN */ /* needs the first argument of strtol be declared as const? */ #define STRTOL_CONST_CHARP 1 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #define TIME_WITH_SYS_TIME 1 /* nonblocking using fcntl with FNDELAY */ #define USE_FCNTL_FNDELAY 1 /* nonblocking using fcntl with O_NDELAY */ #define USE_FCNTL_O_NDELAY 1 /* Can F_SETOWN be used on a socket? */ #define USE_FCNTL_SETOWN 1 /* How to set a socket non-blocking */ #define USE_IOCTL_FIONBIO 1 /* Can SO_OOBINLINE be used on a socket? */ #define USE_OOBINLINE 1 /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT32_T */ /* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT64_T */ /* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT8_T */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef int16_t */ /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef int32_t */ /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef int64_t */ /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef int8_t */ /* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do not define. */ /* #undef intmax_t */ /* Define to the type of a signed integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ /* #undef intptr_t */ /* Define to `int' if <sys/types.h> does not define. */ /* #undef mode_t */ /* Define to `long int' if <sys/types.h> does not define. */ /* #undef off_t */ /* Define to `int' if <sys/types.h> does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define to `int' if <sys/types.h> does not define. */ /* #undef ssize_t */ /* Define to __typeof__ if your compiler spells it that way. */ /* #undef typeof */ /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef uint16_t */ /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef uint32_t */ /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef uint64_t */ /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef uint8_t */ /* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h> do not define. */ /* #undef uintmax_t */ /* Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ /* #undef uintptr_t */ #endif | ||||
|
Gnomi and me traced this issue in some long debug session yesterday and found the bug. The size of word_t was not taken into account in several places in esbrk() in slaballoc.c and smalloc.c. ;-) I will provide a patch this evening. Note: This is actually not a portability issue, it can happen on any platform where sizeof(word_t) == sizeof(void *) != 1. |
|
Patches for slaballoc.c and smalloc.c containing the fixes for this bug are in r2528. Great to have at least one and possibly more memory related crashes less. :-) |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-03-10 15:03 | zesstra | New Issue | |
2009-03-10 15:05 | zesstra | File Added: config.h | |
2009-03-10 15:06 | zesstra | File Added: machine.h | |
2009-03-12 03:56 | zesstra | Note Added: 0000990 | |
2009-03-12 03:56 | zesstra | Assigned To | => zesstra |
2009-03-12 03:56 | zesstra | Status | new => assigned |
2009-03-12 03:56 | zesstra | Category | Portability => Runtime |
2009-03-12 03:56 | zesstra | Target Version | => 3.3.719 |
2009-03-12 03:57 | zesstra | Relationship added | related to 0000553 |
2009-03-12 15:24 | zesstra | Note Added: 0000991 | |
2009-03-12 15:24 | zesstra | Status | assigned => resolved |
2009-03-12 15:24 | zesstra | Fixed in Version | => 3.3.719 |
2009-03-12 15:24 | zesstra | Resolution | open => fixed |
2009-03-12 17:08 | zesstra | Relationship deleted | related to 0000553 |