Bug 1408 - Forgotten constant definition leads to fatal
: Forgotten constant definition leads to fatal
Status: RESOLVED WORKSFORME
: Pike
Core
: 7.3
: All Other
: P5 (on hold) normal
: ---
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2001-03-24 19:23 CET by
Modified: 2001-10-03 20:09 CET (History)
Scrum Prio:
In scrum?: ---
Story included in sprints:
Unplanned in sprints:


Attachments


Description From 2001-03-24 19:23:57 CET
Tried to compile a module in which I've forgotten to define a constant:

Rx.pmod/FSA.pmod:213:'VARIABLE_TESTS' undefined.
Rx.pmod/FSA.pmod:1078:Class definition failed.
/home/mast/Pike/devel/src/interpret.c:1314: Fatal error:
Wrong number of arguments or locals in function def.

Gdb backtrace below. When I add the constant VARIABLE_TESTS everything
works. Trivial minimized test case didn't show this, but I can try harder
to make one if necessary.

(gdb) bt
#0  0x400b2921 in kill () from /lib/libc.so.6
#1  0x4005bef9 in pthread_kill () from /lib/libpthread.so.0
#2  0x4005c375 in raise () from /lib/libpthread.so.0
#3  0x400b3c61 in abort () from /lib/libc.so.6
#4  0x80b4889 in debug_fatal () at /home/mast/Pike/devel/src/error.c:534
#5  0x807ed09 in mega_apply (type=APPLY_LOW, args=168, arg1=0x82cd4a4,
arg2=0x1)
    at /home/mast/Pike/devel/src/interpret.c:1314
#6  0x807feaa in apply_lfun (o=0x82cd4a4, fun=1, args=0)
    at /home/mast/Pike/devel/src/interpret.c:1594
#7  0x80df971 in call_pike_initializers (o=0x82cd4a4, args=0)
    at /home/mast/Pike/devel/src/object.c:255
#8  0x8107134 in compile (prog=0x8353248, handler=0x0, major=-1, minor=-1,
target=0x8346ff0,
    placeholder=0x82cd4a4) at /home/mast/Pike/devel/src/program.c:3981
#9  0x813bd07 in f_compile (args=6) at
/home/mast/Pike/devel/src/builtin_functions.c:3282
#10 0x807e2a2 in mega_apply (type=APPLY_SVALUE, args=6, arg1=0x8323120,
arg2=0x0)
    at /home/mast/Pike/devel/src/interpret.c:994
#11 0x807d150 in eval_instruction_without_debug (pc=0x83200b6
"\"\001\001]\0176hG")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#12 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0xe)
    at /home/mast/Pike/devel/src/interpret.c:797
#13 0x807d150 in eval_instruction_without_debug (pc=0x832030d
"i\004}d\nyU")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#14 0x807f2dc in o_catch (pc=0x83202f3 "G\0066I\004\003y\020")
    at /home/mast/Pike/devel/src/interpret.c:797
#15 0x8079d81 in eval_instruction_without_debug (pc=0x83202ef "!")
    at /home/mast/Pike/devel/src/interpret_functions.h:904
#16 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1d)
    at /home/mast/Pike/devel/src/interpret.c:797
#17 0x807d150 in eval_instruction_without_debug (pc=0x83203d8 "'G")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#18 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1e)
    at /home/mast/Pike/devel/src/interpret.c:797
#19 0x807d150 in eval_instruction_without_debug (pc=0x8320447
"\"S\aH\001\022\017")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#20 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1f)
    at /home/mast/Pike/devel/src/interpret.c:797
#21 0x807d150 in eval_instruction_without_debug (pc=0x83205c0 "d\002z\005")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#22 0x807ed5c in mega_apply (type=APPLY_LOW, args=2, arg1=0x82cd944,
arg2=0x28)
    at /home/mast/Pike/devel/src/interpret.c:797
#23 0x807d150 in eval_instruction_without_debug (pc=0x8320657 "d\001y\r")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#24 0x807ed5c in mega_apply (type=APPLY_STACK, args=1, arg1=0x0, arg2=0x0)
    at /home/mast/Pike/devel/src/interpret.c:797
#25 0x807d150 in eval_instruction_without_debug (pc=0x82ef5b5
"d\002\022\021")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#26 0x807ed5c in mega_apply (type=APPLY_LOW, args=1, arg1=0x82cd544,
arg2=0x7)
    at /home/mast/Pike/devel/src/interpret.c:797
#27 0x807d150 in eval_instruction_without_debug (pc=0x82ef601 "e\"\002")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#28 0x807ed5c in mega_apply (type=APPLY_LOW, args=1, arg1=0x82cd544,
arg2=0x8)
    at /home/mast/Pike/devel/src/interpret.c:797
#29 0x807feaa in apply_lfun (o=0x82cd544, fun=20, args=1)
    at /home/mast/Pike/devel/src/interpret.c:1594
#30 0x80e1ba9 in object_index_no_free (to=0xbfffc0e4, o=0x82cd544,
index=0x401a9388)
    at /home/mast/Pike/devel/src/object.c:907
#31 0x80e3b64 in index_no_free (to=0xbfffc0e4, what=0x401a9380,
ind=0x401a9388)
    at /home/mast/Pike/devel/src/opcodes.c:74
#32 0x80e3c7b in o_index () at /home/mast/Pike/devel/src/opcodes.c:129
#33 0x80fd257 in f_index (args=2) at
/home/mast/Pike/devel/src/operators.c:3107
#34 0x8100111 in index_modules (ident=0x830dde4,
module_index_cache=0x832d17c, num_used_modules=2,
    modules=0x832d520) at /home/mast/Pike/devel/src/program.c:729
#35 0x81004d4 in find_module_identifier (ident=0x830dde4, see_inherit=1)
    at /home/mast/Pike/devel/src/program.c:763
#36 0x80622f9 in yyparse () at language.yacc:3045
#37 0x8106cb8 in compile (prog=0x834f228, handler=0x0, major=-1, minor=-1,
target=0x832b580,
    placeholder=0x0) at /home/mast/Pike/devel/src/program.c:3881
#38 0x813bd07 in f_compile (args=6) at
/home/mast/Pike/devel/src/builtin_functions.c:3282
#39 0x807e2a2 in mega_apply (type=APPLY_SVALUE, args=6, arg1=0x8323120,
arg2=0x0)
    at /home/mast/Pike/devel/src/interpret.c:994
#40 0x807d150 in eval_instruction_without_debug (pc=0x83200b6
"\"\001\001]\0176hG")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#41 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0xe)
    at /home/mast/Pike/devel/src/interpret.c:797
#42 0x807d150 in eval_instruction_without_debug (pc=0x832030d
"i\004}d\nyU")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#43 0x807f2dc in o_catch (pc=0x83202f3 "G\0066I\004\003y\020")
    at /home/mast/Pike/devel/src/interpret.c:797
#44 0x8079d81 in eval_instruction_without_debug (pc=0x83202ef "!")
    at /home/mast/Pike/devel/src/interpret_functions.h:904
#45 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1d)
    at /home/mast/Pike/devel/src/interpret.c:797
#46 0x807d150 in eval_instruction_without_debug (pc=0x83203e2 "'G")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#47 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1e)
    at /home/mast/Pike/devel/src/interpret.c:797
#48 0x807d150 in eval_instruction_without_debug (pc=0x8320447
"\"S\aH\001\022\017")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#49 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1f)
    at /home/mast/Pike/devel/src/interpret.c:797
#50 0x807d150 in eval_instruction_without_debug (pc=0x832049b
"\"\004\0012\f")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#51 0x807ed5c in mega_apply (type=APPLY_STACK, args=3, arg1=0x0, arg2=0x0)
    at /home/mast/Pike/devel/src/interpret.c:797
#52 0x807d150 in eval_instruction_without_debug (pc=0x82ef5d1
"d\002'5\"\002\001p\230\003")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#53 0x807ed5c in mega_apply (type=APPLY_LOW, args=1, arg1=0x82cd584,
arg2=0x7)
    at /home/mast/Pike/devel/src/interpret.c:797
#54 0x807d150 in eval_instruction_without_debug (pc=0x82ef601 "e\"\002")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#55 0x807ed5c in mega_apply (type=APPLY_LOW, args=1, arg1=0x82cd584,
arg2=0x8)
    at /home/mast/Pike/devel/src/interpret.c:797
#56 0x807feaa in apply_lfun (o=0x82cd584, fun=20, args=1)
    at /home/mast/Pike/devel/src/interpret.c:1594
#57 0x80e1ba9 in object_index_no_free (to=0xbfffda64, o=0x82cd584,
index=0x401a91e0)
    at /home/mast/Pike/devel/src/object.c:907
#58 0x80e3b64 in index_no_free (to=0xbfffda64, what=0x401a91d8,
ind=0x401a91e0)
    at /home/mast/Pike/devel/src/opcodes.c:74
#59 0x80e3c7b in o_index () at /home/mast/Pike/devel/src/opcodes.c:129
#60 0x80fd257 in f_index (args=2) at
/home/mast/Pike/devel/src/operators.c:3107
#61 0x81204cf in index_node (n=0x82f12c0, node_name=0x830ed48 "Rx",
id=0x830ed34)
    at /home/mast/Pike/devel/src/las.c:1738
#62 0x8061d7b in yyparse () at language.yacc:2954
#63 0x8106cb8 in compile (prog=0x82ff5b0, handler=0x0, major=-1, minor=-1,
target=0x82e3be8,
    placeholder=0x0) at /home/mast/Pike/devel/src/program.c:3881
#64 0x813bd07 in f_compile (args=6) at
/home/mast/Pike/devel/src/builtin_functions.c:3282
#65 0x807e2a2 in mega_apply (type=APPLY_SVALUE, args=6, arg1=0x8323120,
arg2=0x0)
    at /home/mast/Pike/devel/src/interpret.c:994
#66 0x807d150 in eval_instruction_without_debug (pc=0x83200b6
"\"\001\001]\0176hG")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#67 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0xe)
    at /home/mast/Pike/devel/src/interpret.c:797
#68 0x807d150 in eval_instruction_without_debug (pc=0x832030d
"i\004}d\nyU")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#69 0x807f2dc in o_catch (pc=0x83202f3 "G\0066I\004\003y\020")
    at /home/mast/Pike/devel/src/interpret.c:797
#70 0x8079d81 in eval_instruction_without_debug (pc=0x83202ef "!")
    at /home/mast/Pike/devel/src/interpret_functions.h:904
#71 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1d)
    at /home/mast/Pike/devel/src/interpret.c:797
#72 0x807d150 in eval_instruction_without_debug (pc=0x83203c9 "\"M")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#73 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1e)
    at /home/mast/Pike/devel/src/interpret.c:797
#74 0x807d150 in eval_instruction_without_debug (pc=0x8320447
"\"S\aH\001\022\017")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#75 0x807ed5c in mega_apply (type=APPLY_LOW, args=4, arg1=0x82cd944,
arg2=0x1f)
    at /home/mast/Pike/devel/src/interpret.c:797
#76 0x807d150 in eval_instruction_without_debug (pc=0x832049b
"\"\004\0012\f")
    at /home/mast/Pike/devel/src/interpret_functions.h:1569
#77 0x807ed5c in mega_apply (type=APPLY_LOW, args=3, arg1=0x82cd944,
arg2=0x20)
    at /home/mast/Pike/devel/src/interpret.c:797
#78 0x80e49af in o_cast (type=0x82c5b1c, run_time_type=5) at
/home/mast/Pike/devel/src/opcodes.c:445
#79 0x80e6351 in f_cast () at /home/mast/Pike/devel/src/opcodes.c:651
#80 0x807c575 in eval_instruction_without_debug (pc=0x8320caf "i\f}d\ry'")
    at /home/mast/Pike/devel/src/interpret_functions.h:1421
#81 0x807f2dc in o_catch (pc=0x8320ca8 "<@H\002 ") at
/home/mast/Pike/devel/src/interpret.c:797
#82 0x8079d81 in eval_instruction_without_debug (pc=0x8320ca4 "\016")
    at /home/mast/Pike/devel/src/interpret_functions.h:904
#83 0x807ed5c in mega_apply (type=APPLY_LOW, args=2, arg1=0x82cd944,
arg2=0x4a)
    at /home/mast/Pike/devel/src/interpret.c:797
#84 0x807ff10 in apply (o=0x82cd944, fun=0x81b7427 "_main", args=2)
    at /home/mast/Pike/devel/src/interpret.c:1606
#85 0x80d71db in main (argc=3, argv=0xbffff764) at
/home/mast/Pike/devel/src/main.c:570
------- Comment #1 From 2001-09-23 12:22:03 CET -------
I suspect it will not be fixed if there isn't a smaller test for this.
(Add one to the testsuite if possible?)
------- Comment #2 From 2001-09-25 01:43:09 CET -------
Could you attach the version of FSA.pmod that caused the problem?
------- Comment #3 From 2001-10-03 20:10:53 CET -------
This bug is no longer triggered with a fresh 7.3.

Note

You need to log in before you can comment on or make changes to this bug.