pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2009-04-16T14:11:39Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/3170typeof and (program) interfers.2009-04-16T14:11:39ZPeter Bortastypeof and (program) interfers.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3170
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
// bug.pike
int main(int num, array(string) args) {
function(array(string):int) foo;
werror("%O %O\...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3170
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
// bug.pike
int main(int num, array(string) args) {
function(array(string):int) foo;
werror("%O %O\n", typeof(foo), _typeof(foo));
}
```
[nilsson@m222 nilsson]$ pike bug.pike
function(array(string) : int) zero
```
// bug.pike
int main(int num, array(string) args) {
program p = (program)"a.pike";
function(array(string):int) foo;
werror("%O %O\n", typeof(foo), _typeof(foo));
}
```
[nilsson@m222 nilsson]$ pike bug.pike
program(object) zero
```
// bug.pike
int main(int num, array(string) args) {
function(array(string):int) foo;
werror("%O\n", typeof(foo));
program p = (program)"a.pike";
}
[nilsson@m222 nilsson]$ pike bug.pike
function(array(string) : int) zero
Cannot perform cast to that type.
bug.pike:5: main(1,({"/home/nilsson/bug.pike"}))
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3162SIGSEGV dump when using _get_iterator lfun.2009-04-16T14:11:39ZPeter BortasSIGSEGV dump when using _get_iterator lfun.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3162
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
With ADT.Relation.Binary and Standards.RDF updated to use _get_iterator
efun:
```
Pike v7.3 release 47 run...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3162
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
With ADT.Relation.Binary and Standards.RDF updated to use _get_iterator
efun:
```
Pike v7.3 release 47 running Hilfe v3.4 (Incremental Pike Frontend)
> object r = Standards.RDF();
> r->get_n_triples();
(1) Result: ""
> r->add_relation(r->Node("a"),r->Node("http://x.y",1),r->Node("b"));
(2) Result: 0
> r->get_n_triples();
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 6358)]
0x080d2c74 in object_low_set_index (o=0x830d080, f=1076052408,
from=0x40234200)
at /home/nilsson/Pike/7.3/src/object.c:1107
1107 i=ID_FROM_INT(p, f);
(gdb) bt
#0 0x080d2c74 in object_low_set_index (o=0x830d080, f=1076052408,
from=0x40234200) at /home/nilsson/Pike/7.3/src/object.c:1107
#1 0x080d2e59 in object_set_index2 (o=0x830d080, index=0x402341e8,
from=0x40234200) at /home/nilsson/Pike/7.3/src/object.c:1168
#2 0x080d2f84 in object_set_index (o=0x830d080, index=0x402341e8,
from=0x40234200) at /home/nilsson/Pike/7.3/src/object.c:1194
#3 0x08068e02 in assign_lvalue (lval=0x402341e0, from=0x40234200)
at /home/nilsson/Pike/7.3/src/interpret.c:374
#4 0x0810a901 in foreach_iterate (o=0x840d790)
at /home/nilsson/Pike/7.3/src/iterators.cmod:1687
#5 0x0806dbfc in opcode_F_NEW_FOREACH ()
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1303
#6 0x083140d7 in ?? ()
#7 0x0807286b in o_catch (
pc=0x841552e
"¡P\b!\b\203@\034\022¡@\b!\b\213\025H\b!\b\211\002\203Â\004\211\025H\b!\b\213\025P\b!\b\213R
\201Â\020")
at /home/nilsson/Pike/7.3/src/interpret.c:1447
#8 0x0806d092 in opcode_F_CATCH ()
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1151
#9 0x0841552a in ?? ()
#10 0x08072790 in mega_apply (type=APPLY_LOW, args=0, arg1=0x82eb710,
arg2=0x11) at /home/nilsson/Pike/7.3/src/interpret.c:1409
#11 0x080d140f in call_pike_initializers (o=0x82eb710, args=0)
at /home/nilsson/Pike/7.3/src/object.c:280
#12 0x080d161d in parent_clone_object (p=0x83654bc, parent=0x82fd3e8,
parent_identifier=24, args=0) at
/home/nilsson/Pike/7.3/src/object.c:345
#13 0x08071521 in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x82fd3e8,
arg2=0x18) at /home/nilsson/Pike/7.3/src/apply_low.h:199
#14 0x0806fc87 in opcode_F_CALL_OTHER_AND_POP (arg1=131)
at /home/nilsson/Pike/7.3/src/interpret_functions.h:1899
#15 0x0832fa22 in ?? ()
#16 0x08072790 in mega_apply (type=APPLY_LOW, args=2, arg1=0x82c9ab8,
arg2=0x51) at /home/nilsson/Pike/7.3/src/interpret.c:1409
#17 0x08073267 in apply (o=0x82c9ab8, fun=0x8198517 "_main", args=2)
at /home/nilsson/Pike/7.3/src/interpret.c:1710
#18 0x080ca8e1 in main (argc=2, argv=0xbffffa9c)
at /home/nilsson/Pike/7.3/src/main.c:716
#19 0x400c7316 in __libc_start_main (main=0x80c9f50 <main>, argc=2,
ubp_av=0xbffffa9c, init=0x805f854 <_init>, fini=0x81777b0 <_fini>,
rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbffffa8c)
at ../sysdeps/generic/libc-start.c:129
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3153Image copy error2022-08-28T22:55:17ZPeter BortasImage copy errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3153
Reported by Martin Stjernholm <mast@roxen.com>
I get a lot of errors like these when I run the refdoc extractor in a
spotless tree:
Extracting file "../src/post...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3153
Reported by Martin Stjernholm <mast@roxen.com>
I get a lot of errors like these when I run the refdoc extractor in a
spotless tree:
Extracting file "../src/post_modules/GTK/refdoc/GTK.pmod/Button.pike"...
copying from
[/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button.png]
to [build/images//GTK.Button.1.png]
Error: Could not move
/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button.png
to build/images//GTK.Button.1.png.
(Could not read
/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button.png)
copying from
[/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button_2.png]
to [build/images//GTK.Button.2.png]
Error: Could not move
/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button_2.png
to build/images//GTK.Button.2.png.
(Could not read
/home/mast/Pike/7.3/refdoc/build/src/post_modules/GTK/refdoc/images/gtk_button_2.png)
Note that it tries to copy from the build directory. At the point when it
complains, the images doesn't there, and neither does the images directory.
Afterwards all files seems to be there.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/3151Hilfe sometimes still fails to see defined variables2009-04-16T14:11:39ZPeter BortasHilfe sometimes still fails to see defined variablesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3151
Reported by Robert J. Budzynski, Warsaw University, Dept. of Physics <Robert.Budzynski@fuw.edu.pl>
```
Pike v7.3 release 45 running Hilfe v3.4 (Incremental Pike Fron...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3151
Reported by Robert J. Budzynski, Warsaw University, Dept. of Physics <Robert.Budzynski@fuw.edu.pl>
```
Pike v7.3 release 45 running Hilfe v3.4 (Incremental Pike Frontend)
> string s = "0"*10; string tmp;
> do {tmp=s; s=replace(tmp,"00","0");} while(s!=tmp);
Compiler Error: 1:'s' undefined.
> help about hilfe
Pike v7.3 release 45 running Hilfe v3.4 (Incremental Pike Frontend)
$Id: Hilfe.pmod,v 1.79 2002/06/07 17:44:38 nilsson Exp $
Initial version written by Fredrik Hübinette 1996-2000
Rewritten by Martin Nilsson 2002
```
BTW in 7.2 the same input gives `parse error' at the `do-while' loop.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3149@section blocks disappear2020-03-01T17:33:56ZPeter Bortas@section blocks disappearImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3149
Reported by Martin Stjernholm <mast@roxen.com>
The autodoc comment for map() contains two @section/@endsection blocks.
Neither shows up in the html doc that I get wh...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3149
Reported by Martin Stjernholm <mast@roxen.com>
The autodoc comment for map() contains two @section/@endsection blocks.
Neither shows up in the html doc that I get when I do "make documentation".Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/3146Error in Sql.Sql()->list_fields() when using wildcard.2009-04-16T14:11:39ZPeter BortasError in Sql.Sql()->list_fields() when using wildcard.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3146
Reported by Anders Johansson <anders@roxen.com>
From William Welliver:
I found a bug in pike 7.2.308 and 364 in the Sql module. Apparently using a
wildcard in a cal...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3146
Reported by Anders Johansson <anders@roxen.com>
From William Welliver:
I found a bug in pike 7.2.308 and 364 in the Sql module. Apparently using a
wildcard in a call to list_fields throws an error. Replacing the existing
filter call with the following around line 505 should fix the problem.
Sorry for not having a patch, I don't have easy access to the non-fixed
code right now.
Bill
```
if (wild) {
res = filter(res, lambda(mapping row){
return Regexp(replace(wild, ({"%", "_"}), ({".*", "."})))
->match(row->name);
}
);
}
--
H. William Welliver / Fairchild Semiconductor Mountain Top Systems
email: bill.welliver@fairchildsemi.com / phone: 570.474.6761 x4445 cell:
570.262.7151
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3143Hilfe fails on foreach(iterator; index; value)2009-04-16T14:11:39ZPeter BortasHilfe fails on foreach(iterator; index; value)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3143
Reported by Johan H Sundström, IDA <jhs@pike.ida.liu.se>
An example of how to trig the bug:
```
a205% pike
Pike v7.3 release 45 running Hilfe v3.4 (Incremental Pike...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3143
Reported by Johan H Sundström, IDA <jhs@pike.ida.liu.se>
An example of how to trig the bug:
```
a205% pike
Pike v7.3 release 45 running Hilfe v3.4 (Incremental Pike Frontend)
> string fn="/path/to/rcs/file,v",raw=Stdio.read_file(fn);
> object p=Parser.RCS(fn, 0);
> sizeof(raw=p->parse_delta_sections(p->parse_admin_section(raw)));
(1) Result: 109399
> Parser.RCS.DeltatextIterator it = p->DeltatextIterator(raw);
> int n; Parser.RCS.Revision rev;
> foreach(it; n; rev) write("%d: %O\n", n, rev);
Compiler Error: 1:'rev' undefined.
>
```
The above should have written a list of all revisions of the file.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/3141Postgres doesn't autoquote properly2009-04-16T14:11:39ZPeter BortasPostgres doesn't autoquote properlyImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3141
Reported by Stephen R. van den Berg, Cubic Circle <srb@cuci.nl>
One argument missing in emulate_bindings
```
--- postgres.pike.old Tue Jun 11 09:45:35 2002
+++ po...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3141
Reported by Stephen R. van den Berg, Cubic Circle <srb@cuci.nl>
One argument missing in emulate_bindings
```
--- postgres.pike.old Tue Jun 11 09:45:35 2002
+++ postgres.pike Tue Jun 11 09:44:42 2002
@@ -131,7 +131,7 @@
{
if (!bindings)
return ::big_query(q);
- return ::big_query(.sql_util.emulate_bindings(q,bindings));
+ return
::big_query(.sql_util.emulate_bindings(q,bindings,this_object()));
}
```
#else /* !constant(Postgres.postgres) */Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3139seg fault in connect_unix()2009-04-16T14:11:39ZPeter Bortasseg fault in connect_unix()Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3139
Reported by Robert J. Budzynski, Warsaw University, Dept. of Physics <Robert.Budzynski@fuw.edu.pl>
```
test script:
#!/usr/local/bin/pike7.3
int main()
{ // neither...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3139
Reported by Robert J. Budzynski, Warsaw University, Dept. of Physics <Robert.Budzynski@fuw.edu.pl>
```
test script:
#!/usr/local/bin/pike7.3
int main()
{ // neither of the files "foo" nor "bar" exists
Stdio.File f = Stdio.File();
werror("trying connect_unix(\"foo\")...\n");
f->connect_unix("foo") || Stdio.perror("foo");
werror("trying connect_unix(\"bar\")...\n");
f->connect_unix("bar") || Stdio.perror("bar");
return 0;
}
```
output:
$ ./socket_unix.pike
trying connect_unix("foo")...
foo: No such file or directory
trying connect_unix("bar")...
Segmentation faultPike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3127relay2 gives backtrace on linux (async_connect problem)2022-08-28T15:54:36ZPeter Bortasrelay2 gives backtrace on linux (async_connect problem)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3127
Reported by Marcus Wellhardh <wellhard@roxen.com>
This is written to the debug log if I try to access a relayed page:
```
| Stdio.File(): not open.
| module.File:...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3127
Reported by Marcus Wellhardh <wellhard@roxen.com>
This is written to the debug log if I try to access a relayed page:
```
| Stdio.File(): not open.
| module.File: Stdio.File("socket", "community.roxen.com:80", 777 /* fd=-1
*/)->_disable_callbacks()
| /home/wellhard/projects/pike-7.2/lib/modules/Stdio.pmod/module.pmod
(version 1.115):966: Stdio.File("socket", "community.roxen.com:80", 777 /*
fd=-1 */)->set_nonblocking(0,0,0,0,0)
| /home/wellhard/projects/pike-7.2/lib/modules/Stdio.pmod/module.pmod
(version 1.115):371: Stdio.File("socket", "community.roxen.com:80", 777 /*
fd=-1 */)->_async_check_cb(0)
| : Cannot access global variables in destructed object.
| : protocols/http.pike (version 1.369):1916: unknown function()
| : base_server/roxen.pike (version 1.795):588: roxen->handler_thread(3)
```
The problem disappears if a change:
```
| #if 1
| fd->async_connect( host, port, connected );
| #else
```
to:
```
| #if 0
| fd->async_connect( host, port, connected );
| #else
```
in the relay2.pike modulePike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3122"Stdio.File(): not open" when using SSL.2009-04-16T14:11:39ZPeter Bortas"Stdio.File(): not open" when using SSL.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3122
Reported by Anders Johansson <anders@roxen.com>
I have seen this error occationaly for some time now but can't find a
bugreport for it.
```
: Stdio.File()...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3122
Reported by Anders Johansson <anders@roxen.com>
I have seen this error occationaly for some time now but can't find a
bugreport for it.
```
: Stdio.File(): not open.
16:10:48 : module.File: Stdio.File("socket", "194.52.182.243 1658", 77 /*
fd=-1 */)->_disable_callbacks()
8m48.1s : c:/anders/server-
2.2.284/pike/lib/pike/modules/Stdio.pmod/module.pmod:966: Stdio.File
("socket", "194.52.182.243 1658", 777 /* fd=-1 */)->set_nonblocking
(ssl_read_callback,ssl_write_callback,ssl_close_callback,0,0)
: c:/anders/server-
2.2.284/pike/lib/pike/modules/SSL.pmod/sslfile.pike:497: set_nonblocking
(0,Stdio.Sendfile()->write_cb,0)
: c:/anders/server-
2.2.284/pike/lib/pike/modules/Stdio.pmod/module.pmod:1965: Stdio.Sendfile
()->start_writer()
: c:/anders/server-
2.2.284/pike/lib/pike/modules/Stdio.pmod/module.pmod:2102: Stdio.Sendfile
()->create(@0=({"HTTP/1.0 200 OK\r"+[459]+"ength: 19394
\r\n\r\n","\n<html>\n\n<head>\n"+[19362]+"/body>\n\n</html>\n"}),0,-1,-
1,0,object,@1=sendfile_done)
: module: nb_sendfile()
16:10:48 : c:/anders/server-
2.2.284/pike/lib/pike/modules/Stdio.pmod/module.pmod:2172: sendfile(@0,0,-
1,-1,0,object,@1)
8m48.2s : /anders/server-2.2.284/base_server/fastpipe.pike:36:
outputobject)
: /anders/server-2.2.284/protocols/http.pike:415: unknown
function()
: /anders/server-2.2.284/protocols/http.pike:1881: unknown
function(0)
: /anders/server-2.2.284/protocols/http.pike:1942: unknown
function()
: /anders/server-2.2.284/base_server/roxen.pike:588: roxen-
>handler_thread(4)
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3109Hilfe 3.3 fails to add arrays2009-04-16T14:11:39ZPeter BortasHilfe 3.3 fails to add arraysImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3109
Reported by Marcus Agehall <agehall@roxen.com>
```
When adding two arrays hilfe sometimes fail:
Pike v7.3 release 31 running Hilfe v3.3 (Incremental Pike Frontend)
>...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3109
Reported by Marcus Agehall <agehall@roxen.com>
```
When adding two arrays hilfe sometimes fail:
Pike v7.3 release 31 running Hilfe v3.3 (Incremental Pike Frontend)
> array a=({"a", "b", "c"});
> ({"1"})+a;
Variable declaration detection in relocation broke.
Compiler Error: 1:'a' undefined.
> a;
(1) Result: ({ /* 3 elements */
"a",
"b",
"c"
})
> a+a;
(2) Result: ({ /* 6 elements */
"a",
"b",
"c",
"a",
"b",
"c"
})
> array b = ({"1"})+a;
> b;
(3) Result: ({ /* 4 elements */
"1",
"a",
"b",
"c"
})
```Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/3108Sql backtrace shows password2009-04-16T14:11:39ZPeter BortasSql backtrace shows passwordImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3108
Reported by Petter Larsson <petterl@home.se>
If you make an error in an sql-query or simular, you will get a backtrace
where the password appears, se last line in ba...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3108
Reported by Petter Larsson <petterl@home.se>
If you make an error in an sql-query or simular, you will get a backtrace
where the password appears, se last line in backtrace:
```
usr/local/pike/7.0.352/lib/modules/Sql.pmod/postgres.pike:128:"Postgres
support not available.\n" Cpp() failed
usr/local/pike/7.0.352/lib/master.pike:148:
compile_file
("/usr/local/pike/7.0.352/lib/modules/Sql.pmod/postgres.pike",0)
usr/local/pike/7.0.352/lib/master.pike:378:
low_findprog
("/usr/local/pike/7.0.352/lib/modules/Sql.pmod/postgres",".pike",0)
usr/local/pike/7.0.352/lib/master.pike:417:
findprog("/usr/local/pike/7.0.352/lib/modules/Sql.pmod/postgres","",0)
usr/local/pike/7.0.352/lib/master.pike:650:
ind("/usr/local/pike/7.0.352/lib/modules/Sql.pmod/postgres")
usr/local/pike/7.0.352/lib/master.pike:662: `[]("postgres")
usr/local/pike/7.0.352/lib/modules/Sql.pmod/sql.pike:194:
create("postgres","user","database","PaSSwOrD")
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3107Postgresql-module doesn't return error2015-02-27T16:51:22ZPeter BortasPostgresql-module doesn't return errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3107
Reported by Petter Larsson <petterl@home.se>
When you get an error in a Postgresql big_query(), the only error returned
is:
Error in frontend-backkend communication...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3107
Reported by Petter Larsson <petterl@home.se>
When you get an error in a Postgresql big_query(), the only error returned
is:
Error in frontend-backkend communications and a backtrace.
It would be more interesting to get the error from Postgresql, which will
tell you what went wrong.
A patch like below should fix that:
```
Index: postgres.c
===================================================================
RCS file: /cvs/Pike/7.3/src/modules/Postgres/postgres.c,v
retrieving revision 1.25
diff -r1.25 postgres.c
431a432,433
> char *err;
>
500a503
> err = PQresultErrorMessage(res);
502c505
< Pike_error ("Error in frontend-backend
communications.\n");
---
> Pike_error ("Postgresql error: %s",err);
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3106Pthreads detection on OpenBSD 3.x2009-04-16T14:11:39ZPeter BortasPthreads detection on OpenBSD 3.xImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3106
Reference: http://sourceforge.net/tracker/index.php?func=detail&aid=559577&group_id=8825&atid=108825
Reported by Xavier Beaudouin, ISDnet <kiwi@isdnet.net>
Bugrepor...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3106
Reference: http://sourceforge.net/tracker/index.php?func=detail&aid=559577&group_id=8825&atid=108825
Reported by Xavier Beaudouin, ISDnet <kiwi@isdnet.net>
Bugreports for CAMAS/Caudium about OpenBSD told us that the current
autoconfigure from pike 7.2.339 fails to find the pthreads supports of
OpenBSD 3.x branch.
Tinkering the machine.h help that detection.
It's maybe a good idea to update the autconf to handle that.
OpenBSD one need the flag -pthreads (not -lpthreads as in most
other variants), see http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads.
There for pike dosn't have the threads feature on OpenBSD.
Attached machine.h and config.status from that machine.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3097Thread.all_threads() problem2009-04-16T14:11:39ZPeter BortasThread.all_threads() problemImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3097
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
Thread.all_threads() seems to crash under certain circumstances.
While an easy program like
main() { write(s...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3097
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
Thread.all_threads() seems to crash under certain circumstances.
While an easy program like
main() { write(sizeof(Thread.all_threads()); }
seems to work without problems it causes problems when running inside
threads. I have two small tests. The first crashes after some seconds.
The second almost directly.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3096Pike 7.3.45 segfaults when attempting to decode an encode_value()'d program.2009-04-16T14:11:39ZPeter BortasPike 7.3.45 segfaults when attempting to decode an encode_value()'d program.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3096
Reported by James Tyson, Samizdat New Media Solutions <james@samizdat.co.nz>
The cache in Caudium 1.3 uses the following code to serialise/deserialise
data for stora...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3096
Reported by James Tyson, Samizdat New Media Solutions <james@samizdat.co.nz>
The cache in Caudium 1.3 uses the following code to serialise/deserialise
data for storage on disk:
```
string _encode_value( mixed var ) {
return MIME.encode_base64( encode_value( var, master()->Codec() ) );
}
mixed _decode_value( string data ) {
mixed obj;
if ( catch( obj = decode_value( MIME.decode_base64( data ),
master()->Codec() ) ) ) {
return 0;
}
return obj;
}
```
Which works perfectly with Pike7.2, however seems to be totally broken with
pike7.3.
The Pike process seems to backtrace when decoding the data. Here is a GDB
backtrace:
```
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 20316)]
0x08098bb1 in f_encode_value_canonic ()
(gdb) bt
#0 0x08098bb1 in f_encode_value_canonic ()
#1 0x0809d961 in re_decode ()
#2 0x0809df6f in f_decode_value ()
#3 0x0806ece2 in opcode_F_CALL_BUILTIN ()
#4 0x0837f7a4 in ?? ()
#5 0x0807126e in mega_apply ()
#6 0x0806bf47 in opcode_F_CATCH ()
#7 0x0837f70a in ?? ()
#8 0x0807126e in mega_apply ()
#9 0x0806bf47 in opcode_F_CATCH ()
#10 0x405b85da in ?? ()
#11 0x0807126e in mega_apply ()
#12 0x0806bf47 in opcode_F_CATCH ()
#13 0x405b81d5 in ?? ()
#14 0x08071198 in mega_apply ()
#15 0x08071c47 in apply_svalue ()
#16 0x081436ee in exit_files_efuns ()
#17 0x08093504 in low_backend_once ()
#18 0x08093683 in f_Backend_cq__backtick_28_29 ()
#19 0x0807007c in low_mega_apply ()
#20 0x0806e38f in opcode_F_APPLY_AND_POP ()
#21 0x082d0f3d in ?? ()
#22 0x0807126e in mega_apply ()
---Type <return> to continue, or q <return> to quit---
#23 0x0806bf47 in opcode_F_CATCH ()
#24 0x082d0eb8 in ?? ()
#25 0x08071198 in mega_apply ()
#26 0x08071ba6 in apply ()
#27 0x080c0332 in main ()
#28 0x400c617f in __libc_start_main () from /lib/libc.so.6
(gdb)
```
Aparently the bytecode interpreter barfs.
In this example the bytecode being read is the userdb module, the encoded
data being stored to the disk is "tmtlMCUGEl9zdGF0aWNfbW9kdWxlcy5zeXN0ZW0="
which is obviously incomplete. This seems to only effect the program
datatype, as simple mappings, etc seem to work fine, the metadata for this
object is being stored using the same procedure and seems to work fine
("tmtlMAEHBgB0eXBlBgR2YXJpYWJsZQYAc2l6ZQgkBgpsYXN0X3JldHJpZXZhbCgGAG5hbWUGDG1v
ZHVsZXM6Ly91c2VyZGIGA2V4cGlyZXPIO+dwFgYEX3Byb2dyYW1oBgVyYW1fY2FjaGUPBAYGZGlz
a19jYWNoZQ8EBgBoaXRzrwYAaGFzaAYcNTQ5MDMyMjE4ODVkNDU3OTM1NWE4YmJkNmZjM2VjZTkG
B2NyZWF0ZV90aW1lyDvnG7Y=")Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3095misspelled method name in SANE2009-04-16T14:11:39ZPeter Bortasmisspelled method name in SANEImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3095
Reported by Tamás Tevesz, Royalcomp Ltd. <ice@telnet.hu>
reference/ex/SANE/list_scanners.html (here i actually have it
as `list_scanners2D.html', not sure why..) ref...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3095
Reported by Tamás Tevesz, Royalcomp Ltd. <ice@telnet.hu>
reference/ex/SANE/list_scanners.html (here i actually have it
as `list_scanners2D.html', not sure why..) references to the
list_scanners() method as `list-scanners()', as does the index page.
i don't have sources handy (thus no patch), but i suspect a typo
around the autodocs someplace.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/3087Calling of circular arrays results in SIGSEGV2009-04-16T14:11:39ZPeter BortasCalling of circular arrays results in SIGSEGVImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3087
Reported by @grubba
```
Pike v7.1 release 33 running Hilfe v2.0 (Incremental Pike Frontend)
> array a = ({1});
Result: ({ /* 1 element */
1
})
> ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3087
Reported by @grubba
```
Pike v7.1 release 33 running Hilfe v2.0 (Incremental Pike Frontend)
> array a = ({1});
Result: ({ /* 1 element */
1
})
> a[0] = a;
Result: ({ /* 1 element */
@0
})
> a();
Segmentation Fault (core dumped)
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3085Lacking type checks for void expressions2009-04-16T14:11:39ZPeter BortasLacking type checks for void expressionsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3085
Reported by Martin Stjernholm <mast@roxen.com>
The following program does not trigger an error or a warning, not even with
-w -rT:
```
void f() {}
int main(...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3085
Reported by Martin Stjernholm <mast@roxen.com>
The following program does not trigger an error or a warning, not even with
-w -rT:
```
void f() {}
int main()
{
return f() + 1;
}
```
I think it's just as much a type error in the use of f() as in e.g. this case:
```
mapping f() {return ([]);}
int main()
{
return f() + 1;
}
```
(See also [bug #2677].)Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström