pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2009-04-16T14:11:39Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/4377sscanf doesn't accept [^] as a valid set2009-04-16T14:11:39ZPeter Bortassscanf doesn't accept [^] as a valid setImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4377
Reported by Jonas Wallden <jonasw@roxen.com>
The following statement ought to scan past the sequence of ^ chars since there is no conflicting
interpretation of [^]. ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4377
Reported by Jonas Wallden <jonasw@roxen.com>
The following statement ought to scan past the sequence of ^ chars since there is no conflicting
interpretation of [^]. (Negating the empty set is rather unusable in comparison.)
```
sscanf("^^^^^^^^hello", "%*[^]%s", string res) && res;
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4362Segfault in fix_type_field2009-04-16T14:11:39ZPeter BortasSegfault in fix_type_fieldImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4362
Reported by Martin Stjernholm <mast@roxen.com>
The following program causes a segfault after reporting the compilation error:
```
int main()
{
array m;
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4362
Reported by Martin Stjernholm <mast@roxen.com>
The following program causes a segfault after reporting the compilation error:
```
int main()
{
array m;
foreach (({"Regexp.PCRE.Widestring"}), string symbol)
catch {
if (!zero_type(all_constants()[sym]) ||
!zero_type(master()->resolv(symbol)))
m += ({symbol});
};
}
(gdb) bt
#0 fix_type_field (n=0xa10ac0) at
/home/mast/Pike/no-changes-7.7/src/las.c:3893
#1 0x0000000000508955 in optimize (n=0xa10ac0)
at /home/mast/Pike/no-changes-7.7/src/las.c:5530
#2 0x000000000050d776 in dooptcode (name=0x960330, n=0xffffffff,
type=0xa10ac0,
modifiers=9781792) at /home/mast/Pike/no-changes-7.7/src/las.c:5924
#3 0x000000000042d67f in yyparse () at language.yacc:948
#4 0x00000000004ce072 in run_pass2 (c=0xa27390)
at /home/mast/Pike/no-changes-7.7/src/program.c:6831
#5 0x00000000004ce2fb in compile (aprog=0x0, ahandler=<value optimized
out>, amajor=-1,
aminor=-1, atarget=0x987598, aplaceholder=0x0)
at /home/mast/Pike/no-changes-7.7/src/program.c:7045
#6 0x0000000000517bb7 in f_compile (args=6)
at /home/mast/Pike/no-changes-7.7/src/builtin_functions.c:4075
#7 0x000000000043706f in eval_instruction (pc=<value optimized out>)
at /home/mast/Pike/no-changes-7.7/src/interpret_functions.h:2284
#8 0x000000000043a85b in catching_eval_instruction (
pc=0xa1a87b "!1\026\002�)K\anF\b[\f")
at /home/mast/Pike/no-changes-7.7/src/interpret.c:2223
#9 0x0000000000439a4f in eval_instruction (pc=<value optimized out>)
at /home/mast/Pike/no-changes-7.7/src/interpret_functions.h:1273
#10 0x000000000043a91f in mega_apply (type=<value optimized out>,
args=<value optimized out>, arg1=<value optimized out>, arg2=<value
optimized out>)
at /home/mast/Pike/no-changes-7.7/src/interpret.c:2191
#11 0x00000000004be4fe in o_cast (type=0x952e70, run_time_type=5)
at /home/mast/Pike/no-changes-7.7/src/operators.c:667
#12 0x00000000004bf646 in f_cast () at
/home/mast/Pike/no-changes-7.7/src/operators.c:887
#13 0x0000000000435f7c in eval_instruction (pc=0xa1b776 "K\tnF\n[e")
at /home/mast/Pike/no-changes-7.7/src/interpret_functions.h:1882
#14 0x000000000043a85b in catching_eval_instruction (pc=0xa1b76f
"\031R'\002\237")
at /home/mast/Pike/no-changes-7.7/src/interpret.c:2223
#15 0x0000000000439a4f in eval_instruction (pc=<value optimized out>)
at /home/mast/Pike/no-changes-7.7/src/interpret_functions.h:1273
#16 0x000000000043a91f in mega_apply (type=<value optimized out>,
args=<value optimized out>, arg1=<value optimized out>, arg2=<value
optimized out>)
at /home/mast/Pike/no-changes-7.7/src/interpret.c:2191
#17 0x0000000000425665 in main (argc=4, argv=0x7ffffc8a4d18)
at /home/mast/Pike/no-changes-7.7/src/main.c:569
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4354Problem with unixODBC on linux2009-04-16T14:11:39ZPeter BortasProblem with unixODBC on linuxImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4354
Reported by Marcus Wellhardh <wellhard@roxen.com>
Got the following error when trying to execute a query to a MSSQL 2000 server:
```
Pike v7.7 release 30 running Hi...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4354
Reported by Marcus Wellhardh <wellhard@roxen.com>
Got the following error when trying to execute a query to a MSSQL 2000 server:
```
Pike v7.7 release 30 running Hilfe v3.5 (Incremental Pike Frontend)
> object db = Sql.Sql("odbc://test:test@burns/");
> db->query("Select * from Region");
odbc->fetch_row(): SQLGetData() failed:
SQLError failed (-1:SQL_NO_DATA_FOUND)
src/modules/Odbc/odbc_result.c:648: Odbc.odbc_result()->fetch_row()
test-install/pike/7.7.30/lib/modules/Sql.pmod/Sql.pike:367:
Sql.Sql()->res_obj_to_array(Odbc.odbc_result())
test-install/pike/7.7.30/lib/modules/Sql.pmod/Sql.pike:495:
Sql.Sql()->query("Select * from Region")
```
The applications tsql (freetds native client) and isql (unuxODBC client)
can execute the query. The query does also work if you disable winde string
support in the pike ODBC module.
Client: leguan.roxen.com
FreeTDS: 0.64
unixODBC: 2.2.11
pike: 7.7.30 and 7.4
~ $ cat .odbc.ini
[burns]
Driver = FreeTDS
Server = burns.roxen.com
Port = 1433
Database = Northwind
~ $ cat /etc/odbcinst.ini
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/local/lib/libtdsodbc.so
UsageCount = 1
```
~ $ cat /usr/local/etc/freetds.conf
[...]
[burns]
host = burns.roxen.com
port = 1433
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4351Type checking fails for later declared type with strict_types2009-11-17T16:08:46ZPeter BortasType checking fails for later declared type with strict_typesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4351
Reported by Markus Johansson, Opera Software <markus@opera.com>
```
Compiling this will result in:
foo.pike:5: Warning: Arguments not strictly compatible.
foo.pike:5...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4351
Reported by Markus Johansson, Opera Software <markus@opera.com>
```
Compiling this will result in:
foo.pike:5: Warning: Arguments not strictly compatible.
foo.pike:5: Warning: Expected: function(zero | void ... : object(is 65620))
foo.pike:5: Warning: Got : function(string : void | mixed)
```
Same in 7.6 and 7.7.
```
foo.pike:
#pragma strict_types
int main(int argc, array(string) argv)
{
String("");
}
```
class String(string s) { }Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4341writing and reading variable in module2009-04-16T14:11:39ZPeter Bortaswriting and reading variable in moduleImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4341
Reported by erik eriksson, opera software <ee@opera.com>
See attached archive.
program bug.pike in top directory uses module Tomat.pmod
bug.pike wants to set a glob...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4341
Reported by erik eriksson, opera software <ee@opera.com>
See attached archive.
program bug.pike in top directory uses module Tomat.pmod
bug.pike wants to set a global flag in the library, called morot (example:
could be a flag to control the debug level across all functions/classes in
the moduke). however, it seems impossible to change the debug flag, both
by setting explicitly or by using an accessor method.
the behaviour in 7.6.102 and 7.7.30 seems to be the same.
(not 100% sure that this is a bug, I might have missed something about the
way pike works)Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4337Calender.pmod fails on GMT -8:002009-04-16T14:11:39ZPeter BortasCalender.pmod fails on GMT -8:00Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4337
Reported by Erik Allemann <erik@roxen.com>
```
[RT#8979]
```
Calender.pmod cannot set time correctly for the Pacific timezone (GMT -8:00)
From Hilfe:
```
> Calend...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4337
Reported by Erik Allemann <erik@roxen.com>
```
[RT#8979]
```
Calender.pmod cannot set time correctly for the Pacific timezone (GMT -8:00)
From Hilfe:
```
> Calendar.Second;
localtime failure: localtime() on this system cannot handle the
timestamp -86400 .
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:200:
T imezone.localtime()->paranoia_localtime(-86400)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:236:
T imezone.localtime()->tz_ux(-86400)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/YMD.pmod:165:
Day(We d 31 Dec 1969)->unix_time()
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Time.pmod:177:
Calen dar.Second->make_local()
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Time.pmod:1435:
Cale ndar.Second->autopromote()
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Time.pmod:917:
Calen dar.Second->set_ruleset(Calendar.Ruleset())
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/TimeRanges.pmod:915:
Calendar.Second->set_timezone(Timezone.localtime())
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:132:
C
alendar.Timezone->timezone_expert_rec(Timezone.localtime(),mapping[3],ISO)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:138:
C
alendar.Timezone->timezone_expert_rec(Timezone.localtime(),mapping[3],ISO)
... last 1 frames above repeated 3 times ...
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:138:
C
alendar.Timezone->timezone_expert_rec(Timezone.localtime(),mapping[4],ISO)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:174:
C alendar.Timezone->expert(Timezone.localtime())
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:111:
C alendar.Timezone->_locale()
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/Timezone.pmod:394:
C alendar.Timezone->`[]("locale")
C:/Roxen40425/server-4.0.425/pike/lib/modules/Calendar.pmod/module.pmod:47:
Cale ndar->`[]("_module_value")
C:/Roxen40425/server-4.0.425/pike/lib/master.pike:1087:
master()->dirnode("C:/Ro
xen40425/server-4.0.425/pike/lib/modules/Calendar.pmod")->module_checker()->`!()
C:/Roxen40425/server-4.0.425/pike/lib/master.pike:1146:
master()->dirnode("C:/Ro
xen40425/server-4.0.425/pike/lib/modules/Calendar.pmod")->ind("Second")
C:/Roxen40425/server-4.0.425/pike/lib/master.pike:1207:
master()->dirnode("C:/Ro
xen40425/server-4.0.425/pike/lib/modules/Calendar.pmod")->`[]("Second")
C:/Roxen40425/server-4.0.425/pike/lib/master.pike:303:
master()->compile_string(
"#pragma unpragma_strict_types\nmapping(string:mixed) ___hilfe =
___Hilfe->varia
bles;\n# 1\nmixed ___HilfeWrapper() { return Calendar.Second; ;
}\n","HilfeInput
",,,0)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:1872:
Tools.
Hilfe.StdinHilfe()->hilfe_compile("mixed ___HilfeWrapper() { return
Calendar.Sec
ond; ; }",UNDEFINED)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:1911:
Tools.
Hilfe.StdinHilfe()->evaluate("mixed ___HilfeWrapper() { return Calendar.Second;
; }",1)
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:1697:
Tools.
Hilfe.StdinHilfe()->parse_expression(Tools.Hilfe.Expression(({ /* 4 elements */
"Calendar",
".",
"Second",
";"
})))
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:1319:
Tools.
Hilfe.StdinHilfe()->add_buffer("Calendar.Second;")
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:1270:
Tools.
Hilfe.StdinHilfe()->add_input_line("Calendar.Second;")
C:/Roxen40425/server-4.0.425/pike/lib/modules/Tools.pmod/Hilfe.pmod:2043:
Tools.
Hilfe.StdinHilfe()->create()
object_program(Tools.Hilfe): Tools.Hilfe->StdinHilfe()
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4329ssl problem2013-12-11T18:29:10ZPeter Bortasssl problemImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4329
Reported by erik eriksson, opera software <ee@opera.com>
```
See test case in bug #4304 and Lyskom #15177407
```
output in 7.7.30:
```
ee@sprint:~/tmp$ pike bug8.p...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4329
Reported by erik eriksson, opera software <ee@opera.com>
```
See test case in bug #4304 and Lyskom #15177407
```
output in 7.7.30:
```
ee@sprint:~/tmp$ pike bug8.pike client
client: connecting
client: connected
Indexing the NULL value with "raw_sign".
/usr/local/pike/7.7.30/lib/modules/SSL.pmod/Cipher.pmod:243:
SSL.Cipher-
>rsa_sign(SSL.context(),"\1\0\0""7\3\1E\355\237cHh\206?\363\271\205\306\210L\254\261\
```
255\17F\373\253\304`\357\307\\d<a\357\33\234\0\0\20\0\a\0\5\0\4\0\n"
"\0\t\0\3\0\2\0\1\1\0\2\0\0""6\3\1E\355\237c\31%\244%L\32G-
\341V\243^\203\315\34\342j\372\273H\2
30H\305wp+\23\320\20E\355\237cPikeSSL3\0\0\0\0\0\a\0\v\0\1\316\0\1\313\0\1\310""0\202\1\304""0\2
02\1n\2\1\0""0\r\6\t*\206H\206\367\r\1\1\4\5\0""0m1\v0\t\6\3U\4\6\23\2DE1\23""0"+[487],ADT.struc
t())
```
/usr/local/pike/7.7.30/lib/modules/SSL.pmod/handshake.pike:268:
SSL.connection({ })-
>certificate_verify_packet()
/usr/local/pike/7.7.30/lib/modules/SSL.pmod/handshake.pike:1320:
SSL.connection({ })-
>handle_handshake(14,"","\16\0\0\0")
/usr/local/pike/7.7.30/lib/modules/SSL.pmod/connection.pike:379:
SSL.connection({ })->got_data("")
/usr/local/pike/7.7.30/lib/modules/SSL.pmod/sslfile.pike:1395:
SSL.sslfile(Fd(9))-
>ssl_read_callback(1,"\26\3\1\0:\2\0\0""6\3\1E\355\237c\31%\244%L\32G-
\341V\2
43^\203\315\34\342j\372\273H\230H\305wp+\23\320\20E\355\237cPikeSSL3\0\0\0\0\0\a\0\26\3\1\1\322\
```
v\0\1\316\0\1\313\0\1\310""0\202\1\304""0\202\1n\2\1\0""0\r\6\t*\206H\206\367\r\1\1\4\5\0""0m1\v
0\t\6\3U\4\6\23\2DE1\23""0\21\6\3U\4\b\23\n"
"Thueringen1\20""0\16\6\3U\4\a\23\aIlmenau1\23""0\21\6\3U\4\n"
"\23\n"
"TU
Ilmenau1\f0\n"
"\6\3U\4\v\23\3PMI1\24"+[349])
```
export/spare/pike/data/pikefarm/out_work/7.7/Pike/7.7/src/
backend.cmod:830: Pike.Backend(0)->`()()
bug8.pike:118: /main()->main(2,({"/home/ee/tmp/bug8.pike","client"}))
```Pike 7.8https://git.lysator.liu.se/pikelang/pike/-/issues/4326mktime() timestamp calculation2009-04-16T14:11:39ZPeter Bortasmktime() timestamp calculationImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4326
Reported by Erik Allemann <erik@roxen.com>
```
[RT#8983]
```
RTL having compatibility problems between 2.4 editserver and 4.5-rel2
frontends.
Code excerpt:
```
ma...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4326
Reported by Erik Allemann <erik@roxen.com>
```
[RT#8983]
```
RTL having compatibility problems between 2.4 editserver and 4.5-rel2
frontends.
Code excerpt:
```
mapping mtime = localtime(time(1)) + ([ "min" : 0, "sec" : 0, "hour" : 0
]);
mtime->mday -= 2; // will cause a mtime->mday = -1;
int newtime = mktime(mtime);
write(ctime(newtime));
```
The code is supposed to calculate an timestamp (2 days) in the past. On
pike 7.2 the resulting timestamp will be of February 27th, on pikes 7.4
and 7.6 the calculated timestamp will be March 2nd.Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/4312Stdio.Port: Implementation and documentation differ2020-03-07T14:00:43ZPeter BortasStdio.Port: Implementation and documentation differImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4312
Reported by erik eriksson, opera software <ee@opera.com>
compare:
```
void main()
{
Stdio.Port p = Stdio.Port();
write("id: %O\n", p->query_id());
p->se...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4312
Reported by erik eriksson, opera software <ee@opera.com>
compare:
```
void main()
{
Stdio.Port p = Stdio.Port();
write("id: %O\n", p->query_id());
p->set_id(p);
write("id: %O\n", p->query_id());
}
```
with:
http://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/Stdio/Port/set_id.html
> The default id is this_object().
(I would prefer the implementation to be fixed to reflect what is stated
in the documentation, rather than the other way around)
on my system:
```
ee@sprint:~/tmp$ pike -v
Pike v7.6 release 66 Copyright � 1994-2005 Link�ping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are
welcome to redistribute it under certain conditions; Read the files
COPYING and COPYRIGHT in the Pike distribution for more details.
ee@sprint:~/tmp$ pike bug.pike
id: 0
id: Stdio.Port(ANY:0)
```Pike NextHenrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4309MIME Module fails to decode mail correctly?2009-04-16T14:11:39ZPeter BortasMIME Module fails to decode mail correctly?Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4309
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
When sending a mail with attachements using apples mail application and the
mail body itself is html the fol...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4309
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
When sending a mail with attachements using apples mail application and the
mail body itself is html the following problem occurs:
The mail is not decoded correctly. One attachements is empty and an image
is missing (see the attached mail message).
```
Pike v7.6 release 86 running Hilfe v3.5 (Incremental Pike Frontend)
> MIME.Message msg = MIME.Message(Stdio.read_file("message.txt"));
> msg->body_parts;
(1) Result: ({ /* 2 elements */
MIME.Message(),
MIME.Message()
})
> msg->body_parts[0]->getdata();
(2) Result: "test\r\n\r\n\357\277\274"
> msg->body_parts[1]->getdata();
(3) Result: ""
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4305SSL communication stalls2009-04-16T14:11:39ZPeter BortasSSL communication stallsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4305
Reported by erik eriksson, opera software <ee@opera.com>
See attached test case.
Run in two different terminals on the same computer. Start as
1) pike bug.pike serv...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4305
Reported by erik eriksson, opera software <ee@opera.com>
See attached test case.
Run in two different terminals on the same computer. Start as
1) pike bug.pike server
2) pike bug.pike client
Expected behaviour: a lot of communication back and forth between the two
processes: ping?, pong!, etc
Observed behaviour:
7.6.86: communication stalled after first message sent
7.7: communication stalled after first message sent
7.6.66: works as expected
7.6.51: works as expected
7.6.76: works as expected
some hints:
- reason for problem seems to be that the read callback is deregistred
from the underlying file object.
- a workaround for the problem seems to be to pass 1 as 3rd argument to
macro RUN_MAYBE_BLOCKING in method direct_write in SSL.pmod/sslfile.pike
instead of SSL_INTERNAL_READING, preventing the callback to be unregistred
(possible side effects of workaround unknown).Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4304SSL communication stalls2009-04-16T14:11:39ZPeter BortasSSL communication stallsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4304
Reported by erik eriksson, opera software <ee@opera.com>
See attached test case.
Run in two different terminals on the same computer. Start as
1) pike bug.pike serv...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4304
Reported by erik eriksson, opera software <ee@opera.com>
See attached test case.
Run in two different terminals on the same computer. Start as
1) pike bug.pike server
2) pike bug.pike client
Expected behaviour: a lot of communication back and forth between the two
processes: ping?, pong!, etc
Observed behaviour:
7.6.86: communication stalled after first message sent
7.7: communication stalled after first message sent
7.6.66: works as expected
7.6.51: works as expected
7.6.76: works as expected
some hints:
- reason for problem seems to be that the read callback is deregistred
from the underlying file object.
- a workaround for the problem seems to be to pass 1 as 3rd argument to
macro RUN_MAYBE_BLOCKING in method direct_write in SSL.pmod/sslfile.pike
instead of SSL_INTERNAL_READING, prenting the callback to be unregistred
(possible side effects of workaround unknown).Pike 7.6https://git.lysator.liu.se/pikelang/pike/-/issues/4302program compilation/execution crashes pike2009-04-16T14:11:39ZPeter Bortasprogram compilation/execution crashes pikeImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4302
Reported by erik eriksson, opera software <ee@opera.com>
the following program crashes my pike. tested on various installations
(debian or ubuntu, all running pike v...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4302
Reported by erik eriksson, opera software <ee@opera.com>
the following program crashes my pike. tested on various installations
(debian or ubuntu, all running pike v 7.6.86).
```
ee@sprint:~/tmp$ cat crash.pike
class S {
SSL.context s;
void ss(Parser.XML.NSTree.NSNode sss)
{
Parser.XML.NSTree.NSNode ssss = sss[0];
}
}
void main(){}
ee@sprint:~/tmp$ pike crash.pike
Segmenteringsfel (core dumped)
ee@sprint:~/tmp$ cat nocrash.pike
class S {
void ss(Parser.XML.NSTree.NSNode sss)
{
Parser.XML.NSTree.NSNode ssss = sss[0];
}
SSL.context s;
}
void main(){}
ee@sprint:~/tmp$ pike nocrash.pike
ee@sprint:~/tmp$ pike -v
Pike v7.6 release 86 Copyright � 1994-2006 Link�ping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are
welcome to redistribute it under certain conditions; Read the files
COPYING and COPYRIGHT in the Pike distribution for more details.
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4284Encode problem after compilation failure2011-02-08T15:53:10ZPeter BortasEncode problem after compilation failureImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4284
Reported by Martin Stjernholm <mast@roxen.com>
```
/home/mast/Pike/frozen/src/encode.c:1465: Fatal error:
[Switching to Thread 46912506866400 (LWP 15206)]
Breakpoin...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4284
Reported by Martin Stjernholm <mast@roxen.com>
```
/home/mast/Pike/frozen/src/encode.c:1465: Fatal error:
[Switching to Thread 46912506866400 (LWP 15206)]
Breakpoint 1, debug_fatal (fmt=0x67b147 "Unknown identifier type.\n")
at /home/mast/Pike/frozen/src/error.c:386
386 {
(gdb) bt
#0 debug_fatal (fmt=0x67b147 "Unknown identifier type.\n")
at /home/mast/Pike/frozen/src/error.c:386
#1 0x00000000004aada7 in encode_value2_ (val=<value optimized out>,
data=0x7fffffc087a0,
force_encode=<value optimized out>) at
/home/mast/Pike/frozen/src/encode.c:1465
#2 0x00000000004acd31 in f_encode_value (args=2)
at /home/mast/Pike/frozen/src/encode.c:1698
#3 0x0000000000436845 in eval_instruction_without_debug (
pc=0xbb4f49
"�\fJ\003\033\006'\002��\033\a(\002\003\021�\r��}\001\001\"\020&")
at interpret_functions.h:2178
#4 0x000000000043378d in o_catch (pc=0xc5b334 "!\001(")
at /home/mast/Pike/frozen/src/interpret.c:1383
#5 0x00000000004399a0 in eval_instruction_without_debug (pc=0xc5b32f "k\f")
at interpret_functions.h:1243
#6 0x000000000043378d in o_catch (pc=0xe612b4 "!\001\034\005�\a[\017")
at /home/mast/Pike/frozen/src/interpret.c:1383
#7 0x00000000004399a0 in eval_instruction_without_debug (pc=0xe612af "kz")
at interpret_functions.h:1243
#8 0x000000000043378d in o_catch (pc=0xe61465 "\022\021�\016E\001[\016")
at /home/mast/Pike/frozen/src/interpret.c:1383
#9 0x00000000004399a0 in eval_instruction_without_debug (pc=0xe61460 "k6")
at interpret_functions.h:1243
#10 0x000000000043378d in o_catch (pc=0xf955e4 "&\003�amE\004Z!")
at /home/mast/Pike/frozen/src/interpret.c:1383
#11 0x00000000004399a0 in eval_instruction_without_debug (pc=0xf955df "k\t")
at interpret_functions.h:1243
#12 0x000000000043378d in o_catch (pc=0xc5ab09 "&")
at /home/mast/Pike/frozen/src/interpret.c:1383
#13 0x00000000004399a0 in eval_instruction_without_debug (pc=0xc5ab04 "k\v")
at interpret_functions.h:1243
#14 0x000000000044bd56 in mega_apply (type=<value optimized out>,
args=<value optimized out>, arg1=<value optimized out>, arg2=<value
optimized out>)
at /home/mast/Pike/frozen/src/interpret.c:1383
#15 0x00000000004a036b in backend_do_call_outs (me=0x9ac8c0) at
backend.cmod:1359
#16 0x00000000004a4705 in low_backend_once (me=0x9ac8c0,
timeout=0x7fffffc0acd0)
at backend.cmod:2888
#17 0x00000000004a5164 in f_Backend_cq__backtick_28_29 (args=1) at
backend.cmod:2932
#18 0x0000000000431238 in low_mega_apply (type=APPLY_SVALUE, args=1,
arg1=<value optimized out>, arg2=<value optimized out>) at apply_low.h:214
#19 0x0000000000436fe5 in eval_instruction_without_debug (
pc=0xa1d36f
"�3Q\031R�3X����J\rO�S'\r�\232k����Q\031R�3Q\031R�3X����\001\001!l'")
at interpret_functions.h:1956
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) fr 1
#1 0x00000000004aada7 in encode_value2_ (val=<value optimized out>,
data=0x7fffffc087a0,
force_encode=<value optimized out>) at
/home/mast/Pike/frozen/src/encode.c:1465
1465 Pike_fatal ("Unknown identifier type.\n");
(gdb) p id->identifier_flags
$1 = 27 '\033'
```
I don't understand how it ends up in this error when it looks like the
identifier type is IDENTIFIER_C_FUNCTION.
Anyway, this error is probably connected to an earlier compilation error in
a pmod which this program references.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4265Problem listing a large amount of files2009-04-16T14:11:39ZPeter BortasProblem listing a large amount of filesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4265
Reported by Erik Allemann <erik@roxen.com>
```
Pike v7.4 release 444 running Hilfe v3.5 (Incremental Pike Frontend)
> sizeof(get_dir("diff2"));
Segmentation fault (c...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4265
Reported by Erik Allemann <erik@roxen.com>
```
Pike v7.4 release 444 running Hilfe v3.5 (Incremental Pike Frontend)
> sizeof(get_dir("diff2"));
Segmentation fault (core dumped)
```
The directory contains 107489 files.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4257encoding of Gmp.mpz objects does not work.2009-11-17T15:44:10ZPeter Bortasencoding of Gmp.mpz objects does not work.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4257
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
> encode_value( Gmp.mpz(3) );
Cannot find Gmp.mpz(3) in Gmp.
/usr/local/pike/7.6.91/lib/master.pike:376...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4257
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
```
> encode_value( Gmp.mpz(3) );
Cannot find Gmp.mpz(3) in Gmp.
/usr/local/pike/7.6.91/lib/master.pike:3761:
master()->find_index(Gmp,Gmp.mpz(3),UNDEFINED)
/usr/local/pike/7.6.91/lib/master.pike:3954:
master()->nameof(@0=Gmp.mpz(3),UNDEFINED)
HilfeInput:1: HilfeInput()->___HilfeWrapper()
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4231Reference underflow in compiler2009-04-16T14:11:39ZPeter BortasReference underflow in compilerImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4231
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
mapping m =
# 1 "1"
([])
# 2 "b"
;
results in
**Block: 0x963ea20 Type: string Refs: -1
**...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4231
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
mapping m =
# 1 "1"
([])
# 2 "b"
;
results in
**Block: 0x963ea20 Type: string Refs: -1
**size_shift: 0, len: 1, hash: 112ed491
Locations that handled 0x963ea20: (gc generation: 0/1 gc pass: 0/0)
*** /home/nilsson/Pike/7.7/src/las.c:804 sub_ref (6 times)
*** /home/nilsson/Pike/7.7/src/las.c:821 sub_ref (2 times)
*** /home/nilsson/Pike/7.7/src/las.c:850 sub_ref (2 times)
*** /home/nilsson/Pike/7.7/src/peep.c:72 sub_ref (8 times)
*** /home/nilsson/Pike/7.7/src/peep.c:903 sub_ref (1 times)
*** /home/nilsson/Pike/7.7/src/peep.c:1007 sub_ref (6 times)
*** /home/nilsson/Pike/7.7/src/peep.c:1065 sub_ref (12 times)
*** /home/nilsson/Pike/7.7/src/program.c:2478 sub_ref (1 times) !*!
*** /home/nilsson/Pike/7.7/src/program.c:2684 sub_ref (1 times)
*** /home/nilsson/Pike/7.7/src/program.c:6517 sub_ref (1 times)
*** /home/nilsson/Pike/7.7/src/las.c:892 add_ref (10 times)
*** /home/nilsson/Pike/7.7/src/peep.c:100 add_ref (16 times)
*** /home/nilsson/Pike/7.7/src/peep.c:779 add_ref (4 times)
*** /home/nilsson/Pike/7.7/src/peep.c:964 add_ref (6 times)
*** /home/nilsson/Pike/7.7/src/program.c:5396 add_ref (1 times)
*** /home/nilsson/Pike/7.7/src/program.c:5786 add_ref (1 times)
*** /home/nilsson/Pike/7.7/src/las.c:804 (6 times)
*** /home/nilsson/Pike/7.7/src/las.c:821 (2 times)
*** /home/nilsson/Pike/7.7/src/las.c:850 (2 times)
*** /home/nilsson/Pike/7.7/src/peep.c:72 (8 times)
*** /home/nilsson/Pike/7.7/src/peep.c:903 (1 times)
*** /home/nilsson/Pike/7.7/src/peep.c:1007 (6 times)
*** /home/nilsson/Pike/7.7/src/peep.c:1065 (12 times)
*** /home/nilsson/Pike/7.7/src/program.c:2478 (1 times) !*!
*** /home/nilsson/Pike/7.7/src/program.c:2684 (1 times)
*** /home/nilsson/Pike/7.7/src/program.c:6517 (1 times)
*** /home/nilsson/Pike/7.7/src/stralloc.c:575 (1 times)
*** /home/nilsson/Pike/7.7/src/stralloc.c:1583 (1 times)
*******************
/home/nilsson/Pike/7.7/src/stralloc.c:1045: Fatal error:
Freeing string with -1 references.
No stack - no backtrace.
```
Related to 4173?Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4209Stdio.file_size reports wrong size for directories2009-04-16T14:11:39ZPeter BortasStdio.file_size reports wrong size for directoriesImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4209
Reported by Leif Andersson, LTH Reglerteknik <leif@control.lth.se>
The documentation for Stdio.file_size states:
//! Give the size of a file. Size -1 indicates that...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4209
Reported by Leif Andersson, LTH Reglerteknik <leif@control.lth.se>
The documentation for Stdio.file_size states:
//! Give the size of a file. Size -1 indicates that the file either
//! does not exist, or that it is not readable by you. Size -2
//! indicates that it is a directory, -3 that it is a symlink and -4
//! that it is a device.
//!
The snapshot of 7.7, that I took a few days ago, however, does not give -2
for a directory, but rather the same size as reported by ls -l.
The test script, named prov.pike is:
```
//======== prov.pike =========================
int size;
string filename;
int main() {
filename = "prov.pike";
size = Stdio.file_size(filename);
write("%s size = %d\n", filename,size);
filename = "nisse.nisse";
size = Stdio.file_size(filename);
write("%s size = %d\n", filename,size);
filename = "pike";
size = Stdio.file_size(filename);
write("%s size = %d\n", filename,size);
```
}
// =========== end prov.pike ==============
============== Test results: =====================
> ls -ld pike prov.pike nisse.nisse
ls: nisse.nisse: No such file or directory
drwxr-xr-x 3 leif dip 4096 12 jul 18.29 pike/
-rw-r--r-- 1 leif dip 369 20 jul 12.45 prov.pike
> /opt/pike/7.7.25/bin/pike prov.pike
prov.pike size = 369
nisse.nisse size = -1
pike size = 4096
>
============= Specifications: =============
> head -1 /etc/issue
Fedora Core release 5 (Bordeaux)
```
> uname -srv
Linux 2.6.17-1.2145_FC5smp #1 SMP Sat Jul 1 13:19:14 EDT 2006
> cat buildid.txt
Pike export stamp
time:1152866217
major:7
minor:7
build:25
year:2006
month:07
day:14
hour:08
minute:36
second:57
>
```
======== Other comments ================
Other versions of Pike, including the current stable version 7.6.86, give
results according to the documentation. This version compiled on an FC4
gives the same erroneous result.Pike 7.8https://git.lysator.liu.se/pikelang/pike/-/issues/4206ODBC: Column names are truncated2009-04-16T14:11:39ZPeter BortasODBC: Column names are truncatedImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4206
Reported by Marcus Wellhardh <wellhard@roxen.com>
When using an ODBC connection to an msSQL server the column names are
truncated. It is porbably related to the adde...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4206
Reported by Marcus Wellhardh <wellhard@roxen.com>
When using an ODBC connection to an msSQL server the column names are
truncated. It is porbably related to the added unicode support.
Example (pike from 4.5.78):
```
Pike v7.4 release 398 running Hilfe v3.5 (Incremental Pike Frontend)
> object db=Sql.sql("odbc://test:test@groept");
>
> mixed res = db->query("select * from person");
> werror("%O", res);
({ /* 3 elements */
([ /* 6 elements */
".firs":"Yuri",
".last":"Cauwerts",
".pers":"1",
"firs":"Yuri",
"last":"Cauwerts",
"pers":"1"
]),
```
It has however worked before (pike from 4.0.425):
```
Pike v7.4 release 340 running Hilfe v3.5 (Incremental Pike Frontend)
> object db=Sql.sql("odbc://test:test@groept");
> mixed res = db->query("select * from person");
> werror("%O", res);
({ /* 3 elements */
([ /* 6 elements */
".firstname":"Yuri",
".lastname":"Cauwerts",
".personid":"1",
"firstname":"Yuri",
"lastname":"Cauwerts",
"personid":"1"
]),
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4173double free from las2009-04-16T14:11:39ZPeter Bortasdouble free from lasImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4173
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The code
```
array x =
# 1 "/home/nilsson/xx"
({
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4173
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The code
```
array x =
# 1 "/home/nilsson/xx"
({
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1
})
# 1 "x"
;
```
results in
*** glibc detected *** corrupted double-linked list: 0x082fa4c0 ***
```
Program received signal SIGABRT, Aborted.
[Switching to Thread -1210734912 (LWP 20468)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d839d1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7d852e9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7db770a in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7dbe172 in malloc_trim () from /lib/tls/i686/cmov/libc.so.6
#5 0xb7dbe2ea in free () from /lib/tls/i686/cmov/libc.so.6
#6 0x0809a88a in really_free_array (v=0xb7e84ff4)
at /home/nilsson/Pike/7.6/src/array.c:135
#7 0x08141182 in eval (n=Variable "n" is not available.
) at /home/nilsson/Pike/7.6/src/las.c:5542
#8 0x08141a61 in optimize (n=0x8320930)
at /home/nilsson/Pike/7.6/src/las.c:5240
#9 0x08145924 in dooptcode (name=0x82c2b54, n=0x8320840, type=0x82c36d0,
modifiers=1) at /home/nilsson/Pike/7.6/src/las.c:5670
#10 0x08109065 in end_first_pass (finish=1)
at /home/nilsson/Pike/7.6/src/program.c:3087
#11 0x081094ce in debug_end_program ()
at /home/nilsson/Pike/7.6/src/program.c:3198
#12 0x081098fb in run_pass2 (c=0x82fd538)
at /home/nilsson/Pike/7.6/src/program.c:6552
#13 0x08109b1f in compile (aprog=0x82fcc80, ahandler=0x0, amajor=0, aminor=
0,
atarget=0x83173b0, aplaceholder=0x0)
at /home/nilsson/Pike/7.6/src/program.c:6759
#14 0x0814cd3f in f_compile (args=6)
at /home/nilsson/Pike/7.6/src/builtin_functions.c:3689
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström