pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2017-04-26T13:30:08Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/8012Unlocking of mutexes that are waited on should force thread yielding.2017-04-26T13:30:08ZPeter BortasUnlocking of mutexes that are waited on should force thread yielding.Imported from https://youtrack.roxen.com/issue/PIKE-12
Reported by @grubba
Currently when a mutex is unlocked, the underlying condvar is signaled, but no thread yield is forced. This means that the current thread may relock the mutex w...Imported from https://youtrack.roxen.com/issue/PIKE-12
Reported by @grubba
Currently when a mutex is unlocked, the underlying condvar is signaled, but no thread yield is forced. This means that the current thread may relock the mutex without the waiting thread getting to run, leading to starvation of the waiting thread.https://git.lysator.liu.se/pikelang/pike/-/issues/8008bool resolves to int(1..1)2017-04-27T13:39:11ZPeter Bortasbool resolves to int(1..1)Imported from https://youtrack.roxen.com/issue/PIKE-8
Reported by KG Sterneberg <kg@roxen.com>
I get the following problem:
```
>pike bool-test.pike
int(1..1)
Bool value: 1
Bad argument 1 to foo(). Expected object | { bool = int(1..1)...Imported from https://youtrack.roxen.com/issue/PIKE-8
Reported by KG Sterneberg <kg@roxen.com>
I get the following problem:
```
>pike bool-test.pike
int(1..1)
Bool value: 1
Bad argument 1 to foo(). Expected object | { bool = int(1..1) }.
bool-test.pike:9: /main()->foo(0)
bool-test.pike:5:
/main()->main(1,({"/Users/kg/dev/learning/pike/bool-test.pike"}))
```
when running:
```
int main(int argc, array(string) argv)
{
werror("%O\n", bool);
foo(true);
foo(false);
return 0;
}
variant void foo(bool v) {
werror("Bool value: %O\n", v);
}
variant void foo(object v) {
werror("Object: %O\n", v);
}
```
Without variant it works fine:
```
int main(int argc, array(string) argv)
{
werror("%O\n", bool);
foo(true);
foo(false);
return 0;
}
void foo(bool v) {
werror("Bool value: %O\n", v);
}
}
```
Possible solution (by Grubba):
In master.pike, replace
```
enum bool { false=0, true=1 };
```
with
```
typedef int(0..1) bool;
enum { false=0, true=1 };
```https://git.lysator.liu.se/pikelang/pike/-/issues/8007The Protocols.HTTP.Query timeout is lost during TLS negotiation when using pr...2017-09-15T14:40:31ZPeter BortasThe Protocols.HTTP.Query timeout is lost during TLS negotiation when using proxies.Imported from https://youtrack.roxen.com/issue/PIKE-7
Reported by @grubba
In the interval between Protocols.HTTP.https_proxy_connect_ok() being called, and do_sync_method() being called on successful TLS connection there is no active t...Imported from https://youtrack.roxen.com/issue/PIKE-7
Reported by @grubba
In the interval between Protocols.HTTP.https_proxy_connect_ok() being called, and do_sync_method() being called on successful TLS connection there is no active timeout. This means that if the TLS server is stopped, the connection will hang indefinitely even if a timeout has been set.https://git.lysator.liu.se/pikelang/pike/-/issues/8006Arg module broken2017-09-15T14:40:31ZPeter BortasArg module brokenImported from https://youtrack.roxen.com/issue/PIKE-6
Reported by Marcus Wellhardh <wellhard@roxen.com>
Installing patch "2017-02-01T151715: Pike 8.0: sizeof on Mysql.SqlTable, JWT & JWK" breaks the Arg module:
```
> apollo:roxen wel...Imported from https://youtrack.roxen.com/issue/PIKE-6
Reported by Marcus Wellhardh <wellhard@roxen.com>
Installing patch "2017-02-01T151715: Pike 8.0: sizeof on Mysql.SqlTable, JWT & JWK" breaks the Arg module:
```
> apollo:roxen wellhard$ ./server-6.0.130/bin/roxen
Pike v8.0 release 232 running Hilfe v3.5 (Incremental Pike Frontend)
> indices(Arg);
server-6.0.130/pike/lib/modules/Arg.pmod:421:Bad argument 1 to unknown function.
server-6.0.130/pike/lib/modules/Arg.pmod:421:Expected: int.
server-6.0.130/pike/lib/modules/Arg.pmod:421:Got : object(implements program(/Users/wellhard/Testarea/roxen-6.0.130-r1-ep-macosx_x86_64/roxen/server-6.0.130/pike/lib/modules/Arg.pmod:397)).
server-6.0.130/pike/lib/modules/Arg.pmod:421:Too many arguments to unknown function (expected 1 arguments).
server-6.0.130/pike/lib/modules/Arg.pmod:421:Got : zero.
server-6.0.130/pike/lib/modules/Arg.pmod:491:Cannot inherit program in pass 2 which is not fully compiled yet.
server-6.0.130/pike/lib/modules/Arg.pmod:491:(You probably have a cyclic symbol dependency that the compiler cannot handle.)
server-6.0.130/pike/lib/modules/Arg.pmod:548:Cannot inherit program in pass 2 which is not fully compiled yet.
server-6.0.130/pike/lib/modules/Arg.pmod:548:(You probably have a cyclic symbol dependency that the compiler cannot handle.)
server-6.0.130/pike/lib/modules/Arg.pmod:637:Placeholder already has storage!
```
The following patch fixes the problem:
```
apollo:roxen wellhard$ diff -u server-6.0.130/pike/lib/modules/Arg.pmod.ORIG server-6.0.130/pike/lib/modules/Arg.pmod
--- server-6.0.130/pike/lib/modules/Arg.pmod.ORIG 2017-02-22 11:38:22.000000000 +0100
+++ server-6.0.130/pike/lib/modules/Arg.pmod 2017-02-22 11:47:47.000000000 +0100
@@ -418,7 +418,13 @@
env = getenv();
// Make a list of all the arguments we can parse.
- foreach(::_indices(this, 0), string index)
+ foreach(
+#if __BUILD__ < 368
+ ::_indices(2)
+#else
+ ::_indices(this, 0)
+#endif
+ , string index)
{
mixed val = ::`[](index, this, 0);
if(objectp(val) && val->is_opt) opts[index]=val;
```https://git.lysator.liu.se/pikelang/pike/-/issues/8003Backport support for decoding of JWK from Pike 8.1 to Pike 8.0.2017-09-15T14:40:31ZPeter BortasBackport support for decoding of JWK from Pike 8.1 to Pike 8.0.Imported from https://youtrack.roxen.com/issue/PIKE-3
Reported by @grubbaImported from https://youtrack.roxen.com/issue/PIKE-3
Reported by @grubbahttps://git.lysator.liu.se/pikelang/pike/-/issues/7826string_has_null() fails sometimes in Pike 8.0.28.2016-12-16T18:49:33ZPeter Bortasstring_has_null() fails sometimes in Pike 8.0.28.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7826
Reported by @grubba
mkdirhier in the build system fails:
```
int mkdirhier(string path, int|void mod)
{
werror("mkdirhier(%O, %O)...\n", path, mod);
werror("CWD...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7826
Reported by @grubba
mkdirhier in the build system fails:
```
int mkdirhier(string path, int|void mod)
{
werror("mkdirhier(%O, %O)...\n", path, mod);
werror("CWD: %O\n", getcwd());
werror("mkdir: %O [%O]\n", mkdir, function_object(mkdir));
trace(2);
string a = "";
int r = 1;
function m = mkdir;
if(Stdio.is_dir(path))
return query_num_arg() == 1 ? 1 : (chmod(path, mod),1);
foreach(path/"/", string d)
{
a += d + "/";
if(sizeof(d))
if(query_num_arg() == 1) {
werror("mkdir(%O)\n", a);
r = m(a);
} else {
werror("mkdir(%O, %O)\n", a, mod);
r = m(a, mod);
}
int e = errno();
werror("mkdir(%O, %O) ==> %O\n", a, mod, r);
if (!r) {
werror("Errno: %O: %s\n", e, strerror(e));
}
}
trace(0);
werror("get_dir: %O\n", get_dir());
return r || (query_num_arg() == 2 && (chmod(path, mod),1));
}
mkdirhier("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n", 493)...
CWD: "/home/dist/tmp/build/roxen-pkg-rhel6_x86_64"
mkdir: mkdir [0]
- -: 7ab230->is_dir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n")
- -: 7aaea0->__lambda_65641_1_line_1821("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\...
- module.pmod:2785: 7aaea0->__lambda_65641_1_line_1821() returns: 0
- mkpackage.pike:15: 7ab230->is_dir() returns: 0
- mkpackage.pike:18: program(home/per/src/pike80/src/iterators.cmod:1186)("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217c...
- -: 7ab5c0->create("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n",47)
- -: 7ab5c0->create() returns: 47
- mkpackage.pike:18: returns: object(home/per/src/pike80/src/iterators.cmod:1186)
- -: 7aad50->write("mkdir(%O, %O)\n","#!/",493)
mkdir("#!/", 493)
- mkpackage.pike:26: 7aad50->write() returns: 18
- mkpackage.pike:27: mkdir("#!/",493)
- mkpackage.pike:27: returns: 0
- -: 7aad50->write("mkdir(%O, %O) ==> %O\n","#!/",493,0)
mkdir("#!/", 493) ==> 0
- mkpackage.pike:30: 7aad50->write() returns: 24
- -: 7aad50->write("Errno: %O: %s\n",22,"Invalid argument")
Errno: 22: Invalid argument
- mkpackage.pike:32: 7aad50->write() returns: 28
- -: 7aad50->write("mkdir(%O, %O)\n","#!/bin/",493)
mkdir("#!/bin/", 493)
- mkpackage.pike:26: 7aad50->write() returns: 22
- mkpackage.pike:27: mkdir("#!/bin/",493)
- mkpackage.pike:27: returns: 0
- -: 7aad50->write("mkdir(%O, %O) ==> %O\n","#!/bin/",493,0)
mkdir("#!/bin/", 493) ==> 0
- mkpackage.pike:30: 7aad50->write() returns: 28
- -: 7aad50->write("Errno: %O: %s\n",2,"No such file or directory")
Errno: 2: No such file or directory
- mkpackage.pike:32: 7aad50->write() returns: 36
- -: 7aad50->write("mkdir(%O, %O)\n","#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./",493)
mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./", 493)
- mkpackage.pike:26: 7aad50->write() returns: 69
- mkpackage.pike:27: mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./",493)
- mkpackage.pike:27: returns: 0
- -: 7aad50->write("mkdir(%O, %O) ==> %O\n","#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./",493,0)
mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./", 493) ==> 0
- mkpackage.pike:30: 7aad50->write() returns: 75
- -: 7aad50->write("Errno: %O: %s\n",2,"No such file or directory")
Errno: 2: No such file or directory
- mkpackage.pike:32: 7aad50->write() returns: 36
- -: 7aad50->write("mkdir(%O, %O)\n","#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n...
mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n"
"/", 493)
- mkpackage.pike:26: 7aad50->write() returns: 103
- mkpackage.pike:27: mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n"
"/",493)
- mkpackage.pike:27: returns: 0
- -: 7aad50->write("mkdir(%O, %O) ==> %O\n","#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \...
mkdir("#!/bin/sh\n"
"tar xf \"$0\" StmP1217ce1.sh\n"
"exec ./StmP1217ce1.sh \"$0\" \"$@\"\n"
"/", 493) ==> 0
- mkpackage.pike:30: 7aad50->write() returns: 109
- -: 7aad50->write("Errno: %O: %s\n",2,"No such file or directory")
Errno: 2: No such file or directory
- mkpackage.pike:32: 7aad50->write() returns: 36
get_dir: ({ /* 9 elements */
"StmP17a29d9.sh",
"StmP4bdaf62.sh",
"StmP110dd7c.sh",
"StmP41b2c90.sh",
"StmP618f3c0.sh",
"StmP1217ce1.sh",
"StmPa4d952e.sh",
"StmP10191d8.sh",
"StmPd34cb29.sh"
})
chmod(): Failed: File not found
/home/dist/build/devel/archive/mkpackage.pike:38:
/main()->mkdirhier("#!/bin/sh\ntar xf \"$0\" StmP1217ce1.sh\nexec ./StmP12
17ce1.sh \"$0\" \"$@\"\n",493)
```
mkdir("#!/", 493) failing with errno 22 (EINVAL) indicates that string_has_null() has returned true (from efuns.c):
```
if (string_has_null(str)) {
/* Filenames with NUL are not supported. */
errno = EINVAL;
pop_n_elems(args);
push_int(0);
return;
}
```
string_has_null() is defined in stralloc.h as:
```
static INLINE int ATTRIBUTE((unused)) string_has_null( struct pike_string *x )
{
INT32 min;
if( !x->len ) return 0;
check_string_range(x,0,&min,0);
return min <= 0;
}
```Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/6104Search: Incorrect sub part key2011-10-18T10:59:17ZPeter BortasSearch: Incorrect sub part keyImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6104
Reported by Marcus Wellhardh <wellhard@roxen.com>
Got this backtrace on a server that uses an old external MySQL server (4.0.27) that can't use indexes bigger then 2...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6104
Reported by Marcus Wellhardh <wellhard@roxen.com>
Got this backtrace on a server that uses an old external MySQL server (4.0.27) that can't use indexes bigger then 255 characters:
```
big_query(): Query "
: create table IF NOT EXISTS queue (
8:42:49 : uri blob not null,
0d11h34m : uri_md5 char(32) not null default '',
: template varchar(255) not null default '',
: md5 char(32) not null default '',
: recurse tinyint not null,
: stage tinyint not null,
8:42:49 : UNIQUE(uri_md5),
0d11h34m : INDEX stage (stage),
: INDEX uri (uri(256))
: )
: " failed (Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn'
t support unique sub keys)
: /space/local/backend/roxen/server-5.1.185/pike/lib/modules/Mysql.so:1: mysql(/*Localhost via UNIX socket*/)->big_query("\n create table IF N
OT EXISTS queue (\n uri blob not null,\n uri_md5 char(32) not null default '',\n\ttemplate varchar(255) not null default '',\n\tm
d5 char(32) not nu"+[151])
8:42:49 : /space/local/backend/roxen/server-5.1.185/pike/lib/modules/Sql.pmod/mysql.pike (e1bab684):728: mysql(/*Localhost via UNIX socket*/)->big_query(
"\n create table IF NOT EXISTS queue (\n uri blob not null,\n uri_md5 char(32) not null default '',\n\ttemplate varchar(255) n
ot null default '',\n\tmd5 "+[169],UNDEFINED,UNDEFINED)
0d11h34m : /space/local/backend/roxen/server-5.1.185/pike/lib/modules/Sql.pmod/Sql.pike (rev 1.100):547: Sql.mysql(/*Localhost via UNIX socket*/)->query("
\n create table IF NOT EXISTS queue (\n uri blob not null,\n uri_md5 char(32) not null default '',\n\ttemplate varchar(255) no
t null default '',\n\tmd5 char(32) not nu"+[151])
: /space/local/backend/roxen/server-5.1.185/pike/lib/modules/Search.pmod/Queue.pmod/MySQL.pike:50: Search.Queue.MySQL()->perhaps_create_table()
: /space/local/backend/roxen/server-5.1.185/pike/lib/modules/Search.pmod/Queue.pmod/MySQL.pike:32: Search.Queue.MySQL()->create(Web.Crawler.Stats
(),Web.Crawler.Policy(),"mysql://localhost/search_intranet2011_intranet2011","queue",UNDEFINED,UNDEFINED)
: modules/search/modules/search_sb_interface.pike (rev 1.353):2851: DatabaseProfile(1:intranet2011)->setup_queue()
: modules/search/modules/search_sb_interface.pike (rev 1.353):3025: DatabaseProfile(1:intranet2011)->crawl_url("sitebuilder://intranet2011/gemens
amt/kontor/vardomsorg/styrdokument-och-riktlinj/overgripande-styrdokument/ledningssystem-for-kvalit/Ledningssystem_slutversion-april-2011.pdf",UNDEFINED,UN
DEFINED,,,0)
8:42:49 : modules/search/modules/search_sb_interface.pike (rev 1.353):3052: DatabaseProfile(1:intranet2011)->crawl_sb_file("/gemensamt/kontor/vardomsorg/
styrdokument-och-riktlinj/overgripande-styrdokument/ledningssystem-for-kvalit/Ledningssystem_slutversion-april-2011.pdf",0)
0d11h34m : modules/search/modules/search_sb_interface.pike (rev 1.353):221: RoxenModule(intranet2011/search_sb_interface#0)->sb_index_file(Workarea(,Site(
intranet2011:/space/local/repository/intranet2011.sb/)),,,2)
: modules/search/modules/search_sb_interface.pike (rev 1.353):432: RoxenModule(intranet2011/search_sb_interface#0)->change_hook("file_change","ge
mensamt/kontor/vardomsorg/styrdokument-och-riktlinj/overgripande-styrdokument/ledningssystem-for-kvalit/Ledningssystem_slutversion-april-2011.pdf",0,"",,,0
)
: modules/search/modules/search_sb_interface.pike (rev 1.353):484: RoxenModule(intranet2011/search_sb_interface#0)->after_hook("file_change","gem
ensamt/kontor/vardomsorg/styrdokument-och-riktlinj/overgripande-styrdoku
```
---------------
```
diff --git a/lib/modules/Search.pmod/Queue.pmod/MySQL.pike b/lib/modules/Search.pmod/Queue.pmod/MySQL.pike
index 43bdeca..43a1922 100644 (file)
--- a/lib/modules/Search.pmod/Queue.pmod/MySQL.pike
+++ b/lib/modules/Search.pmod/Queue.pmod/MySQL.pike
@@ -44,9 +44,15 @@ static void perhaps_create_table( )
recurse tinyint not null,
stage tinyint not null,
UNIQUE(uri_md5),
- INDEX stage (stage)
+ INDEX stage (stage),
+ INDEX uri (uri(256))
)
");
+ if (!sizeof(db->query("SHOW INDEX FROM " + table +
+ " WHERE key_name = 'uri'"))) {
+ db->query("ALTER TABLE " + table +
+ " ADD INDEX uri (uri(256))");
+ }
}
```
Perhaps change "INDEX uri (uri(256)" to 255 instead?Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/6052Stdio.write_file return value handling broken2011-08-30T16:13:57ZPeter BortasStdio.write_file return value handling brokenImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6052
Reported by Per Cederqvist <ceder@lysator.liu.se>
Stdio.write_file is documented to return the number of bytes written. However, it actually returns the number of b...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6052
Reported by Per Cederqvist <ceder@lysator.liu.se>
Stdio.write_file is documented to return the number of bytes written. However, it actually returns the number of bytes written by the last call to File()->write.
The do...while loop is broken. It works fine on the first and second run, but on the third run it will write garbage to the file. This is the loop:
```
do {
ret=f->write(str[ret..]);
if (ret < 0)
error ("Couldn't write to %O: %s\n", filename, strerror (f->errno()));
} while (ret < sizeof (str));
```
Consider the case where str is 1000 bytes, and f->write() returns 100 on each call. On the first run, the first 100 bytes of str is written. On the next iteration, bytes 100..199 are written. On the third iteration, bytes 100..199 are written again. Not good. :-)
I doubt that this is much of a problem in practice. It could fail if the disk is full so that the first f->write() cannot write the entire string, but becomes free so that the second f->write() can write some data. Possible, but not very likely. At least on Linux signals seems to be blocked so that sending a SIGSTOP does not interrupt the write(2) system call. If that is not true on all platforms, there is a real problem here.Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3611ldaps throws error2009-04-16T14:11:39ZPeter Bortasldaps throws errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3611
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
I get a backtrace from sslfile when trying to establish ldaps connection:
```
object l = Protocols.LDAP.cli...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3611
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
I get a backtrace from sslfile when trying to establish ldaps connection:
```
object l = Protocols.LDAP.client("ldaps://shovel.uni-paderborn.de/");
Unknown program: 0(0)
/usr/local/pike/7.5.17/lib/modules/SSL.pmod/sslfile.pike:335:
SSL.sslfile(0)->create(Fd(9),SSL.context(),1,1)
/usr/local/pike/7.5.17/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:412:
Protocols.LDAP.client("socket", "shovel.uni-paderborn.de:636", 777 /* fd=
9 */)->create("ldaps://shovel.uni-paderborn.de/",SSL.context())
Attempt to call the NULL-value
Unknown program: 0(0)
/usr/local/pike/7.5.17/lib/modules/SSL.pmod/sslfile.pike:1039:
SSL.sslfile(0)->update_internal_state(0)
/usr/local/pike/7.5.17/lib/modules/SSL.pmod/sslfile.pike:782:
SSL.sslfile(0)->set_blocking()
/usr/local/pike/7.5.17/lib/modules/SSL.pmod/sslfile.pike:506:
SSL.sslfile(0)->destroy()
```
It seems like the stream has no set_close_callback() and no set_id() function ?Pike 7.6https://git.lysator.liu.se/pikelang/pike/-/issues/3193Tru64 cc compile error in Oracle module2009-04-16T14:11:39ZPeter BortasTru64 cc compile error in Oracle moduleImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3193
Reference: http://130.236.214.222/xenofarm_results/103_23/makelog.txt
Reported by Dan Nelson <dnelson_1901@yahoo.com>
A couple places in oracle.c, the code uses "co...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3193
Reference: http://130.236.214.222/xenofarm_results/103_23/makelog.txt
Reported by Dan Nelson <dnelson_1901@yahoo.com>
A couple places in oracle.c, the code uses "cond?true:false" constructs
with differing types for true and false. Tru64 cc seems to be overly
paranoid about this and errors out. For example: src/modules/Oracle/oracle.c:
```
static void push_inout_value(struct inout *inout, struct dbcon *dbcon) {
ub1 *bufp = 0;
cc: Error: src/modules/Oracle/oracle.c, line 1230: In the initializer for
_, a common type could not be determined for the 2nd and 3rd operands
("bufp" and """") of a conditional operator. (badcondit)
push_string(make_shared_binary_string(loblen ? bufp : "",loblen));
--------^
```
Fix:
Cast the offending types, I guess? There are multiple places cc prints the
same message; you can get the build log from Pikefarm, under
"dbsrv1.emsphone.com". Pick a red build.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2767Some sort of compiler bug2009-04-16T14:11:39ZPeter BortasSome sort of compiler bugImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2767
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code
```
mapping basun = ([ "foo":Image.Image(10,10) ]);
add_constant("basun", basun);
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2767
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code
```
mapping basun = ([ "foo":Image.Image(10,10) ]);
add_constant("basun", basun);
program p = compile_string("Image.Image i=basun.foo;\n"
"mixed x() { return basun; }", "-");
```
gives the following error
```
-:1:Couldn't store constant.
`==: illegal argument 2
Pike/7.3/build/sunos-5.8-i86pc/test-install/pike/7.3.16/lib/modules/Image.s
o.image:
Image.Image( 10 x 10 /* 0.3Kb */)->`==(mapping[1])
Pike/7.3/build/sunos-5.8-i86pc/test-install/pike/7.3.16/lib/master.pike:223
:
master()->compile_string("Image.Image i=basun.foo;\nmixed x() { return
basun; }","-",0)
```
If however the declaration of i is removed of the return is changed from
basun to i it works.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1757Strange behaviour of combine_path on NT2009-04-16T14:11:39ZPeter BortasStrange behaviour of combine_path on NTImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1757
Reported by Marcus Wellhardh <wellhard@roxen.com>
The Mysql template copy routine in roxenloader.pike uses Filesystem.Tar
to initialize the mysql tables. This fails ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1757
Reported by Marcus Wellhardh <wellhard@roxen.com>
The Mysql template copy routine in roxenloader.pike uses Filesystem.Tar
to initialize the mysql tables. This fails because the first call from
Filesystem.Tar to combine_path differ from combine_path_unix:
combine_path("/", "mysql", "") ==> "C:/mysql/"
combine_path_unix("/", "mysql", "") ==> "/mysql/"
If I put a werror("", "bogus arg"); before the call to combine_path
then the two results become equal.Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7830Gdbm 1.13 breaks Pike 8.0 compilation under fedora 252017-05-23T11:20:59ZPeter BortasGdbm 1.13 breaks Pike 8.0 compilation under fedora 25Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7830
Reported by josef radinger <cheese@nosuchhost.net>
fedora has a problem with installation from sources of roxen webserver, because there is a incompatibility with gd...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7830
Reported by josef radinger <cheese@nosuchhost.net>
fedora has a problem with installation from sources of roxen webserver, because there is a incompatibility with gdbm 1.13 and the pike-sources. if i downgrade to gdbm 1.12 it works.
```
make[4]: Entering directory '/home/cheese/test/roxen-6.1.200-src/pike/src/modules/Gdbm'
make[5]: Entering directory '/home/cheese/test/roxen-6.1.200-src/pike/src/modules/Gdbm'
Compiling gdbmmod.c
Compiling object.c
Compiling stack_allocator.c
/home/cheese/test/roxen-6.1.200-src/pike/src/pike_error.h:54:34: error: expected ‘)’ before string constant
(fprintf(stderr,msg_fatal_error,__FILE__,(long)__LINE__),debug_fatal)
^
In file included from /home/cheese/test/roxen-6.1.200-src/pike/src/threads.h:11:0,
from gdbmmod.c:9:
/home/cheese/test/roxen-6.1.200-src/pike/src/pike_error.h:54:58: error: expected ‘)’ before ‘,’ token
(fprintf(stderr,msg_fatal_error,__FILE__,(long)__LINE__),debug_fatal)
^
Compilation command was:
/home/cheese/test/roxen-6.1.200-src/pike/src/smartlink gcc -I. -I/home/cheese/test/roxen-6.1.200-src/pike/src/modules/Gdbm -I/home/cheese/test/roxen-6.1.200-src/pike/src -I/home/cheese/test/roxen-6.1.200-src/pike/src -I/usr/local/include -DHAVE_CONFIG_H -g -ggdb -m64 -mrdrnd -fvisibility=hidden -O3 -pipe -fvar-tracking-assignments -funswitch-loops -W -Wall -Wno-unused -Wcomment -Wformat -Wimplicit-function-declaration -Wmultichar -Wunused-function -Wswitch -Wuninitialized -Wpointer-arith -Wchar-subscripts -Wno-long-long -Wdeclaration-after-statement -fPIC -DDYNAMIC_MODULE -c gdbmmod.c -o gdbmmod.o
Makefile:171: recipe for target 'gdbmmod.o' failed
make[5]: *** [gdbmmod.o] Error 1
make[5]: Leaving directory '/home/cheese/test/roxen-6.1.200-src/pike/src/modules/Gdbm'
Makefile:103: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/cheese/test/roxen-6.1.200-src/pike/src/modules/Gdbm'
```Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7828Loop documentation contains inappropriate examples2022-08-28T14:56:44ZPeter BortasLoop documentation contains inappropriate examplesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7828
Reference: http://pike.lysator.liu.se/docs/tutorial/statements/loops.xml
Reported by Daniel Wressle <wressle@roxen.com>
At http://pike.lysator.liu.se/docs/tutorial/...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7828
Reference: http://pike.lysator.liu.se/docs/tutorial/statements/loops.xml
Reported by Daniel Wressle <wressle@roxen.com>
At http://pike.lysator.liu.se/docs/tutorial/statements/loops.xml there is an example code snippet which reads as follows:
```
string answer;
write("Have you stopped beating your wife yet?\n");
do
{
write("Answer yes or no: ");
answer = Stdio.stdin->gets();
} while(answer != "yes" && answer != "no");
```
I don't think further comments are necessary. Alter or remove.Pike Nexthttps://git.lysator.liu.se/pikelang/pike/-/issues/7827Can't build Pike 8.0 in Distmaker2020-03-05T17:09:13ZPeter BortasCan't build Pike 8.0 in DistmakerImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7827
Reported by Jonas Wallden <jonasw@roxen.com>
Getting this on RHEL7_x86_64:
```
Linking VCDiff
vcdiff_wrapper.o: In function `__static_initialization_and_destruction...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7827
Reported by Jonas Wallden <jonasw@roxen.com>
Getting this on RHEL7_x86_64:
```
Linking VCDiff
vcdiff_wrapper.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/4.8.2/iostream:74: undefined reference to `__dso_handle'
/usr/bin/ld: vcdiff_wrapper.o: relocation R_X86_64_PC32 against undefined hidden symbol `__dso_handle' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Linking failed:
```Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7820Calling function with wrong type of arg should generate run-time error!2016-11-02T12:57:21ZPeter BortasCalling function with wrong type of arg should generate run-time error!Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7820
Reported by Karl Gustav Sterneberg <kg@roxen.com>
Today I accidentally called a function taking a multiset with an array as argument. Got some strange behaviour. Whe...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7820
Reported by Karl Gustav Sterneberg <kg@roxen.com>
Today I accidentally called a function taking a multiset with an array as argument. Got some strange behaviour. When I found out my mistake I did the following experiment:
```
int main(int argc, array(string) argv)
{
object ref = Bar();
ref->my_function((<"Adam", "Bertil">));
ref->my_function(({"Adam", "Bertil"}));
return 0;
}
class Bar {
void my_function(multiset my_set) {
werror("multisetp(my_set): %O\n", multisetp(my_set));
werror("arrayp(my_set): %O\n", arrayp(my_set));
foreach(my_set; mixed entry;) {
werror("entry: %O\n", entry);
}
}
}
```
>pike arg-match.pike
multisetp(my_set): 1
arrayp(my_set): 0
entry: "Adam"
entry: "Bertil"
multisetp(my_set): 0
arrayp(my_set): 1
entry: 0
entry: 1
The problem as I see it is that this should blow up at runtime! As now it can give your system strange behaviour.
```
If I change "object ref = Bar();" to "Bar ref = Bar();" the compiler will complain:
>pike arg-match.pike
arg-match.pike:5:Bad argument 1 to my_function.
arg-match.pike:5:Expected: multiset.
arg-match.pike:5:Got : array(string(65..116)).
Pike: Failed to compile script.
```
By not using a properly typed object reference, it is understandable that the compiler might not be able to see the problem. Then however you should get a run-time error!Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7783Cast to program is not thread-safe.2016-09-21T15:50:06ZPeter BortasCast to program is not thread-safe.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7783
Reported by @grubba
Running
```
string filename;
program p = (program)filename;
p(@args);
```
in two concurrent threads on the same filename may cause one of...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7783
Reported by @grubba
Running
```
string filename;
program p = (program)filename;
p(@args);
```
in two concurrent threads on the same filename may cause one of the threads to fail with eg "Attempting to clone an unfinished program".Pike NextHenrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7712Stdio.Buffer()->add_int32(0xffffffff) does not work on 32-bit systems2016-06-09T18:12:45ZPeter BortasStdio.Buffer()->add_int32(0xffffffff) does not work on 32-bit systemsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7712
Reported by Per Cederqvist <ceder@lysator.liu.se>
The add_int32() method of Stdio.Buffer is supposed to accept any
32-bit number, in the range 0-0xffffffff. When Pi...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7712
Reported by Per Cederqvist <ceder@lysator.liu.se>
The add_int32() method of Stdio.Buffer is supposed to accept any
32-bit number, in the range 0-0xffffffff. When Pike is compiled
on a 64-bit system this works. But on a 32-bit i686 Debian 8 it fails:
```
Bad argument 1 to add_int32(). Expected int.
Unknown program: add_int32(4294967295)
-:1:
_static_modules._Stdio()->Buffer(0 bytes, read=[..-1] data=[0..-1] free=[0
..224] allocated)->add_int32(4294967295)
/home/minibuilder/buffer-fun.pike:6: /main()->main()
```
Test program:
```
#!/usr/bin/env pike8
int main()
{
Stdio.Buffer buffer = Stdio.Buffer();
buffer->add_int32(0xffffffff);
werror("%O\n", buffer->read());
return 0;
}
```
Tested with the current head of the 8.0 branch from the Git
repo.Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7671Implement support for JWT2017-07-07T11:25:12ZPeter BortasImplement support for JWTImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7671
Reported by Martin Karlgren <marty@roxen.com>
Implement Pike support for JSON Web Tokens (encoding and decoding), see http://jwt.io/ and RFC 7519.
The decode functi...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7671
Reported by Martin Karlgren <marty@roxen.com>
Implement Pike support for JSON Web Tokens (encoding and decoding), see http://jwt.io/ and RFC 7519.
The decode function should have support for specifying allowed algorithms, defaulting to some reasonable value (see discussion on possible vulnerabilities: https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/)Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/7664"Parent lost, cannot clone program." error in a complex Pike program2016-03-17T12:11:00ZPeter Bortas"Parent lost, cannot clone program." error in a complex Pike programImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7664
Reported by Per Cederqvist <ceder@lysator.liu.se>
I have a program (under NDA, so I cannot show it to you) that is 6244
lines long, consisting of 10 .pmod files and ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7664
Reported by Per Cederqvist <ceder@lysator.liu.se>
I have a program (under NDA, so I cannot show it to you) that is 6244
lines long, consisting of 10 .pmod files and one .pike file. Actually,
it includes even more Pike modules.
When run, it will after some time print this error message and exit:
Parent lost, cannot clone program.
There is also a backtrace.
```
I've been able to create a minimal testcase that reproduces my issue.
This is a set of just 5 files, for a total of 54 lines. Admittedly,
the test program looks strange with a lot of unused functions and methods;
in the real program they are actually used and do useful things.
```
When I run the minimized and sanitized file, I get this output:
```
$ pike main.pike
Parent lost, cannot clone program.
State.pmod:8: /home/cederp/sanitized/State.read_file()
main.pike:4: /main()->main()
$
```
I'll attach a shar archive of my test programs. Unpack it in en empty
directory.
This reproduces with a fresh Pike 8.0.182 compiled from source on
Ubuntu 14.04. (It also reproduces on a modified Pike 7.8).Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström