As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
Possible - yes. A good idea - probably not. I've looked at many of the macros and usually think they make sense, at least when rtldebug and dmalloc isn't enabled. For the most part, they get overly bloated only when debug is enabled; it's not uncommon that the debug parts are a bit sloppy and don't bother to isolate some overly long debug checks into functions.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-18 01:16: Subject: Re: Nettle cmod segfault
Sure, I can try. I also have the same problem in the same macro from files.cmod (I don't remember exactly where) so it's not related to Nettle. I'll send the debug tomorrow from a Pike with rtldebug.
As we are speaking of that, wouldn't it be possible to make this macros with a little less code in it (and generally in macros used in Pike)?
/ David Gourdelier
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Do you think you can try with a pike that got --with-rtldebug? (Or does it already have that?) There's a lot of pointers and stuff hidden in that macro so it's not easy to tell which one is awry.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-17 16:21: Subject: Nettle cmod segfault
Hi list,
I have a segfault when using the Nettle cmod under FreeBSD 4.7, it seems to be related to threads:
/home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138: Fatal error:
Program received signal SIGSEGV, Segmentation fault. 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 138 THREADS_DISALLOW(); (gdb) display data->len 2: data->len = 56 (gdb) display (char*)data->str 4: ( char *) data->str = 0xa06d014 "camas_fix_coding://Bertrand LUPART bertrand@linkeo.com" (gdb) bt #0 0x2860f340 in f_HashState_update (args=1) at /home/david/Pike/7.6/src/post_modules/Nettle/hash.cmod:138 #1 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e20, arg2=0x3) at /home/david/Pike/7.6/src/apply_low.h:214 #2 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=1) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #3 0x8563339 in ?? () #4 0x8070eea in eval_instruction ( pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #5 0x808abed in o_catch (pc=0x8563138 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #6 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #7 0x8563132 in ?? () #8 0x8070eea in eval_instruction ( pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #9 0x808abed in o_catch (pc=0x90c9328 "¡0\025.\b\203@\034\024ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:2027 #10 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #11 0x90c9322 in ?? () ---Type <return> to continue, or q <return> to quit--- #12 0x8070eea in eval_instruction (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:1229 #13 0x808abed in o_catch (pc=0x9571fd8 "ÇD$\004\005") at /home/david/Pike/7.6/src/interpret.c:2027 #14 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #15 0x9571fd2 in ?? () #16 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #17 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #18 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #19 0x285f087d in container_callback (this=0xa02a600, thisobj=0x8da9e08, v=0x98cc258, startc=0x8b96180, cstartc=2006, endc=0x8b96180, cendc=3885, st=0x8892f30, cutstart=0x8892f3c, ccutstart=0x8892f40, cutend=0x8b96180, ccutend=3892) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #20 0x285f2b50 in do_try_feed (this=0xa02a600, thisobj=0x8da9e08, st=0x8892f30, feed=0x8892f3c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #21 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #22 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #23 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9e08, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #24 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #25 0x9571a8b in ?? () #26 0x8070eea in eval_instruction ( pc=0x956dbc6 "\213\r0\025.\b¸:$©ö÷Ø\211A\034ÇD$\004") at /home/david/Pike/7.6/src/interpret.c:1229 #27 0x808aab0 in mega_apply (type=APPLY_STACK, args=8, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #28 0x808acfc in f_call_function (args=8) at /home/david/Pike/7.6/src/interpret.c:2053 #29 0x285f087d in container_callback (this=0xa010400, thisobj=0x8da9c70, v=0x98cc720, startc=0x8b96190, cstartc=123, endc=0x8b96190, cendc=16534, st=0x8892f50, cutstart=0x8892f5c, ccutstart=0x8892f60, cutend=0x8b96190, ccutend=16541) at /home/david/Pike/7.6/src/modules/Parser/html.c:2735 #30 0x285f2b50 in do_try_feed (this=0xa010400, thisobj=0x8da9c70, st=0x8892f50, feed=0x8892f5c, finished=1, ignore_tag_cb=0) at /home/david/Pike/7.6/src/modules/Parser/html.c:3224 #31 0x285f48b2 in try_feed (finished=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3737 ---Type <return> to continue, or q <return> to quit--- #32 0x285f534e in html_finish (args=1) at /home/david/Pike/7.6/src/modules/Parser/html.c:3932 #33 0x8088500 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x8da9c70, arg2=0xc) at /home/david/Pike/7.6/src/apply_low.h:214 #34 0x8083614 in jump_opcode_F_CALL_OTHER (arg1=55) at /home/david/Pike/7.6/src/interpret_functions.h:1958 #35 0x9571a8b in ?? () #36 0x8070eea in eval_instruction (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:1229 #37 0x808abed in o_catch (pc=0x8c90b06 "ÇD$\004\e") at /home/david/Pike/7.6/src/interpret.c:2027 #38 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #39 0x8c90b00 in ?? () #40 0x8070eea in eval_instruction ( pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:1229 #41 0x808abed in o_catch (pc=0x8b27564 "¡0\025.\b\203@\034\017ÇD$\004\234") at /home/david/Pike/7.6/src/interpret.c:2027 #42 0x807c1a4 in jump_opcode_F_CATCH () at /home/david/Pike/7.6/src/interpret_functions.h:1240 #43 0x8b2755e in ?? () #44 0x8070eea in eval_instruction ( ---Type <return> to continue, or q <return> to quit--- pc=0x8b27527 "\213\r0\025.\b¸Ù\212M÷÷Ø\211A\034Ç\004$\226") at /home/david/Pike/7.6/src/interpret.c:1229 #45 0x808aab0 in mega_apply (type=APPLY_STACK, args=2, arg1=0x0, arg2=0x0) at /home/david/Pike/7.6/src/interpret.c:1982 #46 0x808acfc in f_call_function (args=2) at /home/david/Pike/7.6/src/interpret.c:2053 #47 0x8164fe2 in new_thread_func (data=0xbfbfef3c) at /home/david/Pike/7.6/src/threads.c:868 #48 0x282e01b4 in _thread_start () from /usr/lib/libc_r.so.4 #49 0x0 in ?? ()
The problem seems to happen everytime now just after I upgraded my Pike to the CVS version. I had a 7.6.6 before and it was working fine.
/ David
/ Brevbäraren
/ Brevbäraren