pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2013-08-29T14:38:11Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/1326Backtraces go back past call outs2013-08-29T14:38:11ZPeter BortasBacktraces go back past call outsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1326
Reported by Martin Stjernholm <mast@roxen.com>
With the new backend system, backtraces in call outs give info that is not
part of their context. E.g:
```
int ma...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1326
Reported by Martin Stjernholm <mast@roxen.com>
With the new backend system, backtraces in call outs give info that is not
part of their context. E.g:
```
int main()
{
call_out (lambda () {error ("foo\n");}, 0);
return -1;
}
```
produces:
```
foo
/home/mast/foo.pike:3: __lambda_65590_0()
backend.cmod:2095: `()(3600.000000)
```
Note the backend.cmod frame. The backtrace also contains the _main frame,
but describe_backtrace doesn't write that one out. I consider this an error
since those frames are not part of the caller context for the call out; a
call out is always called without such a context, just like a function
started in a thread.
The function _do_call_outs also exhibits this:
```
int main()
{
call_out (lambda () {error ("foo\n");}, 0);
_do_call_outs();
}
```
produces:
```
foo
/home/mast/foo.pike:3: __lambda_65590_0()
backend.cmod:2095: _do_call_outs()
/home/mast/foo.pike:4: main()
```
(This might also cause security problems in sandbox situations, since a
sandboxed function could use backtrace() to get references to objects
outside its restricted environment.)Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1330Oracle.pmod should not be dumped2009-04-16T14:11:39ZPeter BortasOracle.pmod should not be dumpedImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1330
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
Oracle.pmod should not be dumped. It depends on external factors such
as ORACLE_HOME and LD_LI...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1330
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
Oracle.pmod should not be dumped. It depends on external factors such
as ORACLE_HOME and LD_LIBRARY_PATH.
If Oracle.pmod is dumped when these external factors are unavailable,
it is a extremely tricky for our customers/consultants to figure out
that they're supposed to remove the file Oracle.pmod.o to get things
working at all.Pike 7.0https://git.lysator.liu.se/pikelang/pike/-/issues/1336Segfault in Image.PNM.decode2009-04-16T14:11:39ZPeter BortasSegfault in Image.PNM.decodeImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1336
Reference: http://mc.pp.se/hus.ppm
Reported by @marcus
This PPM picture makes PNM.decode dump core. xv can display it.
```
Pike v7.2 release 10 running Hilfe v2.0...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1336
Reference: http://mc.pp.se/hus.ppm
Reported by @marcus
This PPM picture makes PNM.decode dump core. xv can display it.
```
Pike v7.2 release 10 running Hilfe v2.0 (Incremental Pike Frontend)
> Image.PNM.decode(Stdio.read_file("/home/marcus/mc.pp.se/hus.ppm"));
Segmentation fault (core dumped)
```Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1348Image.Colortable loses colors2009-04-16T14:11:39ZPeter BortasImage.Colortable loses colorsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1348
Reported by Henrik Wallin, Roxen <hedda@roxen.com>
The order of elements in an array of colors to Image.Colortable() is
important somehow.
/home/hedda/colortablebug...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1348
Reported by Henrik Wallin, Roxen <hedda@roxen.com>
The order of elements in an array of colors to Image.Colortable() is
important somehow.
/home/hedda/colortablebugg.pike @ Idonex is an exemple program that read
the file k.png and generates one correct file 'rätt.gif' and one errorous
file 'fel.gif'. The only difference is the order of the elements in the
array.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/1370Bad autodoc dump error message2009-04-16T14:11:39ZPeter BortasBad autodoc dump error messageImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1370
Reported by Johan H Sundström, IDA <jhs@pike.ida.liu.se>
This broken markup:
/*! @decl int exece(string file, array(string) args,
*! mapping(string...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1370
Reported by Johan H Sundström, IDA <jhs@pike.ida.liu.se>
This broken markup:
/*! @decl int exece(string file, array(string) args,
*! mapping(string:string) env)
(a forgotten "@" at the end of the first line) ends up with this fairly
incomprehensible error message:
```
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:102:
parseError("Expected type, idents or literal constant")
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:428:
parseArgList(1)
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:567:
parseDecl(mapping[2])
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/DocParser.pmod:706:
getMetaData()
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/DocParser.pmod:837:
metadata()
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/CExtractor.pmod:79:
parseObject()
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/CExtractor.pmod:149:
parseClassBody(,,,0)
/i/pike/7.3.2/lib/modules/Tools.pmod/AutoDoc.pmod/CExtractor.pmod:174:
extract("/*\\\n||| This file a part of Pike, and is copyright by
Fredrik Hubinette\n||| Pike is distributed as GPL (General Public
License)\n||| See the files COPYING "+[29596],"../../.
./../../src/modules/files/efuns.c")
/home/jhs/Pike/7.3/bin/autodoc.pike:30:
main(2,({"/home/jhs/Pike/7.3/bin/autodoc.pike","../../../../../src/modules/files/efuns.c"}))
Lookup on non-string value.
/home/jhs/Pike/7.3/bin/autodoc.pike:11:
main(2,({"/home/jhs/Pike/7.3/bin/autodoc.pike","../../../../../src/modules/files/efuns.c"}))
```Pike 7.6https://git.lysator.liu.se/pikelang/pike/-/issues/1373Casting efuns to object yields coredump.2009-04-16T14:11:39ZPeter BortasCasting efuns to object yields coredump.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1373
Reported by @grubba
```
From: Alexander Demenshin <aldem-pike@aldem.net>
To: pike-bugs@roxen.com
Date: Wed, 21 Mar 2001 01:47:18 +0100
Subject: Another one
```
Hell...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1373
Reported by @grubba
```
From: Alexander Demenshin <aldem-pike@aldem.net>
To: pike-bugs@roxen.com
Date: Wed, 21 Mar 2001 01:47:18 +0100
Subject: Another one
```
Hello again,
So there is another one:
```
aldem@fort:~/cvs$ pike
Pike v7.2 release 12 running Hilfe v2.0 (Incremental Pike Frontend)
> (object)time;
Segmentation fault
aldem@fort:~/cvs$
```
The same when I do pike -e '(string)(object)time;'
Not usual operation (casting to object), but I was reading
tutorial and decided to try :)
/AlPike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1407Image.image->copy() might be lacking some boundary checks2009-04-16T14:11:39ZPeter BortasImage.image->copy() might be lacking some boundary checksImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1407
Reported by @zino
This is a "remember to check this on a modern Pike later" ticket.
```
Pike v7.1 release 57 running Hilfe v2.0 (Incremental Pike Frontend)
> objec...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1407
Reported by @zino
This is a "remember to check this on a modern Pike later" ticket.
```
Pike v7.1 release 57 running Hilfe v2.0 (Incremental Pike Frontend)
> object i = Image.Image(20,20)->copy(50,50,100,100);
Result: Image.Image( 51 x 51 /* 7.6Kb */)
> object i = Image.PNG.decode(Stdio.read_bytes("scrn0123.map.png"));
Result: Image.Image( 186 x 188 /* 102.4Kb */)
> object o = i->copy( 611, 49, 796, 236 );
zsh: segmentation fault pike
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1408Forgotten constant definition leads to fatal2009-04-16T14:11:39ZPeter BortasForgotten constant definition leads to fatalImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1408
Reported by Martin Stjernholm <mast@roxen.com>
Tried to compile a module in which I've forgotten to define a constant:
```
Rx.pmod/FSA.pmod:213:'VARIABLE_TESTS' und...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1408
Reported by Martin Stjernholm <mast@roxen.com>
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
```Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/1410HSV mode layers do not combine correctly2009-04-16T14:11:39ZPeter BortasHSV mode layers do not combine correctlyImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1410
Reported by @zino
Several layer modes missbehaves. Attaching several example GIFs with
desired look to the left and how Pike handles them to the right.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1410
Reported by @zino
Several layer modes missbehaves. Attaching several example GIFs with
desired look to the left and how Pike handles them to the right.Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1425modules\files\efuns.c(505) : error C2065: 's' : undeclared identifier2009-04-16T14:11:39ZPeter Bortasmodules\files\efuns.c(505) : error C2065: 's' : undeclared identifierImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1425
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
```
Compiling
/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files/file.c
Co...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1425
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
```
Compiling
/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files/file.c
Compiling
/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files/efuns.c
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(505)
: error C2065: 's' : undeclared identifier
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(512)
: warning C4047: 'function' : 'const char *' differs in levels of
indirection from 'int '
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(512)
: warning C4024: 'unlink' : different types for formal and actual parameter
1
CL returned error code 2.
WARNING: Compiler failure! Trying without optimization!
echo /home/distmaker/Distmaker/2.2/build/pike.nt4sp6/build/smartlink rntcl
-I.
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files/../..
-I../.. -I. -Dpike_module_init=pike_module_files_init
-Dpike_module_exit=pike_module_files_exit
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/build -g
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src
-I/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/build -c
/home/distmaker/Distmaker/2.2/build/pike.nt4sp6/pike/src/modules/files/efuns.c
-o efuns.o
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(505)
: error C2065: 's' : undeclared identifier
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(512)
: warning C4047: 'function' : 'const char *' differs in levels of
indirection from 'int '
\distmaker\Distmaker\2.2\build\pike.nt4sp6\pike\src\modules\files\efuns.c(512)
: warning C4024: 'unlink' : different types for formal and actual parameter
1
CL returned error code 2.
make[3]: *** [efuns.o] Error 2
```Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1426Calling of this_program in __INIT causes C stack overflow.2009-04-16T14:11:39ZPeter BortasCalling of this_program in __INIT causes C stack overflow.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1426
Reported by @grubba
```
From: Alexander Demenshin <aldem-pike@aldem.net>
To: pike-bugs@roxen.com
Date: Tue, 27 Mar 2001 13:29:36 +0200
Subject: Another problem (stac...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1426
Reported by @grubba
```
From: Alexander Demenshin <aldem-pike@aldem.net>
To: pike-bugs@roxen.com
Date: Tue, 27 Mar 2001 13:29:36 +0200
Subject: Another problem (stack overflow etc.: pike -e 'mixed p =
this_program();')
```
Hello,
So, subject says it all :) Problem also exists (though messages are
different) when I try to run:
```
#! /usr/local/bin/pike
mixed p = this_program();
```
int main(int argc, array(string) argv)
{
}
If call to this_program() is from inside of any function everything
is OK, if outside - "C stack overflow".
/AlPike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1437MIME.pmod problems with parsing '\\'2009-04-16T14:11:39ZPeter BortasMIME.pmod problems with parsing '\\'Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1437
Reported by Peter Lundqvist, n/a <peterl@update.uu.se>
The MIME module seems to have problems with parsing '\\' chars.
This is a problem as win-browsers tend to send...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1437
Reported by Peter Lundqvist, n/a <peterl@update.uu.se>
The MIME module seems to have problems with parsing '\\' chars.
This is a problem as win-browsers tend to send filenames as
"N:\\fjuk\\moeg\\junk.txt".
This simple pike-script illustrates the problem:
```
--[fnyk.pike]------------------------------------------
#! /usr/local/bin/pike
void main() {
object msg = MIME.Message(
"MIME-Version: 1.0\r\nContent-type: "
"multipart/form-data;boundary=---------"
"------------------10338236936774\r\n\r\n" +
#"-----------------------------10338236936774
Content-Disposition: form-data; name=\"op\"
ul
-----------------------------10338236936774
Content-Disposition: form-data; name=\"foofile\";
filename=\"N:\\Program\\Fnyk\\index.txt\"
Content-Type: text/plain
```
Det var en kyckling som hette gullefjunk...
-----------------------------10338236936774
Content-Disposition: form-data; name=\"fjuk\"
Upload
-----------------------------10338236936774--
```
-----------------------------10338236936774--");
int parts=sizeof( msg->body_parts );
for( int i=0; i<parts; i++ ) {
object o = msg->body_parts[i];
if( !zero_type( o->disp_params["filename"] ) )
write( o->get_filename()+"\n" );
}
}
```
--[EOF: fnyk.pike]-------------------------------------
```
# ./fnyk.pike
N:ProgramFnykindex.txt
#
```Pike 7.0Marcus ComstedtMarcus Comstedthttps://git.lysator.liu.se/pikelang/pike/-/issues/1457PDFs: Code examples loses newlines2009-04-16T14:11:39ZPeter BortasPDFs: Code examples loses newlinesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1457
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
All code examples in the pike tutorial PDF has no newlines. The same
problem exists in the Roxen manuals-Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1457
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
All code examples in the pike tutorial PDF has no newlines. The same
problem exists in the Roxen manuals-Pike 7.0https://git.lysator.liu.se/pikelang/pike/-/issues/1459Wrong pike logo in pike tutorial2009-04-16T14:11:39ZPeter BortasWrong pike logo in pike tutorialImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1459
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The pike fish used in the pike tutorial is the old one. It is even worse in
the PDF version, when it is not...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1459
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The pike fish used in the pike tutorial is the old one. It is even worse in
the PDF version, when it is not rendered against white background.Pike 7.0https://git.lysator.liu.se/pikelang/pike/-/issues/1463create_process() fails with stack-error on MacOSX2009-04-16T14:11:39ZPeter Bortascreate_process() fails with stack-error on MacOSXImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1463
Reported by @grubba
```
Doing test 9748 (9748 total)
1: mixed a() { return allocate(10,thread_create)(lambda() { for(int
x=0;x<10;x++) { for(int e=0;e<50;e++)
if(P...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1463
Reported by @grubba
```
Doing test 9748 (9748 total)
1: mixed a() { return allocate(10,thread_create)(lambda() { for(int
x=0;x<10;x++) { for(int e=0;e<50;e++)
if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return e;
__signal_watchdog(); } return -1;})->wait() - ({-1}); }
2: mixed b() { return ({}); }
/home/grubba/src/Pike/7.3/src/signal_handler.c:2669: Fatal error:
[Switching to thread 5 (process 28485 thread 0x2703)]
[Switching to process 28485 thread 0x2703]
Breakpoint 1, debug_fatal (fmt=0x0) at
/home/grubba/src/Pike/7.3/src/error.c:501
501 if (in_fatal)
(gdb) bt
#0 debug_fatal (fmt=0x0) at /home/grubba/src/Pike/7.3/src/error.c:501
#1 0x00086f6c in f_create_process (args=1) at
/home/grubba/src/Pike/7.3/src/signal_handler.c:2669
#2 0x0002be8c in mega_apply (type=11226416, args=1, arg1=0xab35b0,
arg2=0xaaccf8) at /home/grubba/src/Pike/7.3/src/interpret.c:1227
#3 0x0002da48 in apply_lfun (o=0xd43f24, fun=-2887690, args=1) at
/home/grubba/src/Pike/7.3/src/interpret.c:1594
...
(gdb) up
#1 0x00086f6c in f_create_process (args=1) at
/home/grubba/src/Pike/7.3/src/signal_handler.c:2669
2669 pop_n_elems(sp - stack_save);
(gdb) p Pike_interpreter
$1 = {
stack_pointer = 0x26bc050,
evaluator_stack = 0x26bc000,
mark_stack_pointer = 0x2780004,
mark_stack = 0x2780000,
frame_pointer = 0xaacfe4,
evaluator_stack_malloced = 1,
mark_stack_malloced = 0,
recoveries = 0x1b66b70,
thread_id = 0xc7eb04,
stack_top = 0x1a3dec8 "",
svalue_stack_margin = 100,
c_stack_margin = 8000,
t_flag = 0
}
(gdb) p stack_save
$2 = (struct svalue *) 0x1608050
```
Note that stack_save seems to be from a different stack than
stack_pointer/evaluator_stack. Most likely a bug in the MacOSX
thread-library.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/1464malloc(3)/realloc(3) on MacOSX doesn't always take rlimit into account.2009-04-16T14:11:39ZPeter Bortasmalloc(3)/realloc(3) on MacOSX doesn't always take rlimit into account.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1464
Reported by @grubba
This has the effect that the binary will instead fail when the memory is
used. The program will print the message:
"*** malloc[29683]: error fo...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1464
Reported by @grubba
This has the effect that the binary will instead fail when the memory is
used. The program will print the message:
"*** malloc[29683]: error for object 0xf42000: Can't vm_copy region".
and then die of signal EXC_BAD_ACCESS.
Example:
Doing test 6412 (6412 total)
1: mixed a() { return
search(sprintf("%'"+"+-*"+"'*n"+"SUNE",100000+1),"SUNE"); }
2: mixed b() { return 100000+1; }
*** malloc[29683]: error for object 0xf42000: Can't vm_copy region
```
Program received signal EXC_BAD_ACCESS, Could not access memory.
realloc_unlinked_string (a=0xf42000, size=200002) at
/home/grubba/src/Pike/7.3/src/stralloc.c:1376
1376 r->len=size;
(gdb) p r
$1 = (struct pike_string *) 0xf5b000
(gdb) p *r
Cannot access memory at address 0xf5b000
(gdb) p a
$2 = (struct pike_string *) 0xf42000
(gdb) p *a
$3 = {
refs = 0,
size_shift = 0,
len = 100001,
hval = 160790766,
next = 0xffffffff,
str = "+"
}
```
r is the return value from realloc(3), or from begin_wide_shared_string()
(which translates to malloc(3)), and should be NULL if the memory couldn't
be allocated.
The MacOSX manualpage for malloc(3) does not mention this behaviour, so
it's most likely a bug in libc.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/1468Stack underflow in XML parser2009-04-16T14:11:39ZPeter BortasStack underflow in XML parserImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1468
Reported by @marcus
When parsing a notation declaration without an ExternalID or PublicID, the
parser causes pike to dump core.
```
Pike v7.2 release 26 running Hil...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1468
Reported by @marcus
When parsing a notation declaration without an ExternalID or PublicID, the
parser causes pike to dump core.
```
Pike v7.2 release 26 running Hilfe v2.0 (Incremental Pike Frontend)
> Parser.XML.Simple()->parse("<!DOCTYPE root [\n<!NOTATION JPGformat
>\n]>\n", lambda(mixed ...){});
/home/marcus/pike/src/modules/spider/xml.c:1608: Fatal error:
Stack underflow.
Attempting to dump backlog (may fail)...
Backtrace at time of fatal:
/home/marcus/pike/lib/modules/Parser.pmod/XML.pmod/Simple.pike:
parse("<!DOCTYPE root [\n<!NOTATION JPGformat
>\n]>\n",__lambda_65625_0)
-:1: ___Foo4711()
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:103:
do_evaluate("mixed ___Foo4711() { return
(mixed)(Parser.XML.Simple()->pars
e(\"<!DOCTYPE root [\\n<!NOTATION JPGformat >\\n]>\\n\", lambda(mixed
...)
{}));
}\n",1)
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:603:
parse_statement("Parser.XML.Simple()->parse(\"<!DOCTYPE root
[\\n<!NOTATIO
N JPGformat >\\n]>\\n\", lambda(mixed
...){});")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:381: do_parse()
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:224:
add_buffer("Parser.XML.Simple()->parse(\"<!DOCTYPE root [\\n<!NOTATION
JPG
format >\\n]>\\n\", lambda(mixed
...){});\n")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:623:
add_input_line("Parser.XML.Simple()->parse(\"<!DOCTYPE root
[\\n<!NOTATION
JPGformat >\\n]>\\n\", lambda(mixed
...){});\n")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:703: create()
Hilfe: StdinHilfe()
/home/marcus/pike/bin/hilfe:5: main(1,({"/home/marcus/pike/bin/hilfe"}))
make: *** [run_hilfe] Abort (core dumped)
```Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1469parse_dtd function in XML parser loses extra argument2009-04-16T14:11:39ZPeter Bortasparse_dtd function in XML parser loses extra argumentImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1469
Reported by @marcus
If parse_dtd detects a PE reference, and the callback doesn't provide a
value of the PE, the error is deliviered to the callback with incorrect
e...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1469
Reported by @marcus
If parse_dtd detects a PE reference, and the callback doesn't provide a
value of the PE, the error is deliviered to the callback with incorrect
extra arguments (note how the 3 turns into "error"):
```
Pike v7.2 release 26 running Hilfe v2.0 (Incremental Pike Frontend)
> Parser.XML.Simple()->parse_dtd("%hej;\n", lambda(mixed ...
args){werror("%O\n", args);}, 1, 2, 3);
({ /* 8 elements */
"%",
"hej",
([ /* 1 element */
"in_attribute":0
]),
0,
([ /* 1 element */
"location":5
]),
1,
2,
3
})
({ /* 8 elements */
"error",
0,
0,
"No such entity.",
([ /* 1 element */
"location":5
]),
1,
2,
"error"
})
/home/marcus/pike/src/modules/spider/xml.c:2233: Fatal error:
Stack underflow.
Attempting to dump backlog (may fail)...
Backtrace at time of fatal:
/home/marcus/pike/lib/modules/Parser.pmod/XML.pmod/Simple.pike:
parse_dtd("%hej;\n",__lambda_65625_0,1,2,"Backtrace at time of
fatal:\n")
-:1: ___Foo4711()
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:103:
do_evaluate("mixed ___Foo4711() { return
(mixed)(Parser.XML.Simple()->pars
e_dtd(\"%hej;\\n\", lambda(mixed ... args){werror(\"%O\\n\", args);},
1, 2
, 3));
}\n",1)
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:603:
parse_statement("Parser.XML.Simple()->parse_dtd(\"%hej;\\n\",
lambda(mixed
... args){werror(\"%O\\n\", args);}, 1, 2,
3);")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:381: do_parse()
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:224:
add_buffer("Parser.XML.Simple()->parse_dtd(\"%hej;\\n\", lambda(mixed
...
args){werror(\"%O\\n\", args);}, 1, 2,
3);\n")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:623:
add_input_line("Parser.XML.Simple()->parse_dtd(\"%hej;\\n\",
lambda(mixed
... args){werror(\"%O\\n\", args);}, 1, 2,
3);\n")
/home/marcus/pike/lib/modules/Tools.pmod/Hilfe.pmod:703: create()
Hilfe: StdinHilfe()
/home/marcus/pike/bin/hilfe:5: main(1,({"/home/marcus/pike/bin/hilfe"}))
make: *** [run_hilfe] Abort (core dumped)
```Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1476Undeclared entity error disappears in XML parser2009-04-16T14:11:39ZPeter BortasUndeclared entity error disappears in XML parserImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1476
Reported by @marcus
If an undeclared or external entity reference appears in the default valyue
of an <!ATTLIST> declaration, and the callback does not provide a val...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1476
Reported by @marcus
If an undeclared or external entity reference appears in the default valyue
of an <!ATTLIST> declaration, and the callback does not provide a value for
it, the default value entry is absent from the resulting array, and there
is no error message either.
```
Pike v7.3 release 4 running Hilfe v2.0 (Incremental Pike Frontend)
> Parser.XML.Simple()->parse("<!DOCTYPE x [<!ATTLIST a b CDATA '&c;'>]>",
lambda(mixed ... args){werror("%O", args);});
({ /* 5 elements */
"&",
"c",
([ /* 1 element */
"in_attribute":1
]),
0,
([ /* 1 element */
"location":37
])
})({ /* 5 elements */
"<!ATTLIST",
"a",
([ /* 1 element */
"b":({ /* 2 elements */
({ /* 1 element */
"CDATA"
}),
({ /* 1 element */
""
})
})
]),
0,
([ /* 1 element */
"location":39
])
})({ /* 5 elements */
"<!DOCTYPE",
"x",
([ ]),
({ }),
([ /* 1 element */
"location":41
])
})Result: ({ })
>
```Pike 7.2https://git.lysator.liu.se/pikelang/pike/-/issues/1503FILE.gets() can get in invalid state2009-04-16T14:11:39ZPeter BortasFILE.gets() can get in invalid stateImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1503
Reported by Mirar , Idonex Heavy Industries <mirar@roxen.com>
Somehow, cached_lines can be something other then ({}),
```
mailing: setik@usinternet.com
Bad argumen...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1503
Reported by Mirar , Idonex Heavy Industries <mirar@roxen.com>
Somehow, cached_lines can be something other then ({}),
```
mailing: setik@usinternet.com
Bad argument 1 to sizeof().
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Stdio.pmod/module.pmod:1051:
gets()
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Protocols.pmod/NNTP.pmod:16:
readreturncode()
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Stdio.pmod/module.pmod:1219:
__INIT()
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Protocols.pmod/NNTP.pmod:75:
__INIT()
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Protocols.pmod/SMTP.pmod:7:
__INIT()
/usr/local/pike/mirar/pike/7.3.2/lib/modules/Protocols.pmod/SMTP.pmod:122:
```
__INIT()
SMTP: client("elfwood.lysator.liu.se")
```
string gets()
{
1051: if( sizeof( cached_lines ) > lp+1 )
{
string r = cached_lines[ lp++ ];
```
I currently do not have more clues.
This bugreport is to remember that the problem exists
(if it repeat itself) or if someone happen to spot the
error.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström