pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2020-03-01T15:06:56Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/4577switch() on types not working even when `==() succeeds2020-03-01T15:06:56ZPeter Bortasswitch() on types not working even when `==() succeedsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4577
Reported by Jonas Wallden <jonasw@roxen.com>
```
class Abstract { };
class Fruit { inherit Abstract; };
class Color { inherit Abstract; };
void main()
{
Fruit ban...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4577
Reported by Jonas Wallden <jonasw@roxen.com>
```
class Abstract { };
class Fruit { inherit Abstract; };
class Color { inherit Abstract; };
void main()
{
Fruit banana = Fruit();
Color yellow = Color();
werror("Is banana a fruit? %O\n", object_program(banana) == Fruit);
werror("Is yellow a fruit? %O\n", object_program(yellow) == Fruit);
switch (object_program(banana)) {
case Fruit:
werror("Yes, banana is still a fruit.\n");
break;
default:
werror("Banana is a... uh, don't remember.\n");
break;
}
}
```
Interestingly enough the program works if the inherit of Abstract is removed from the Fruit class.Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4576Parser.XML.Validating bails out with error for invalid content within nameles...2009-04-16T14:11:39ZPeter BortasParser.XML.Validating bails out with error for invalid content within nameless contextImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4576
Reported by Erik Forsberg, Opera Software <forsberg@opera.com>
Running this example script:
```
--begin example--
#!/usr/bin/env pike
class MyValidatingParser {
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4576
Reported by Erik Forsberg, Opera Software <forsberg@opera.com>
Running this example script:
```
--begin example--
#!/usr/bin/env pike
class MyValidatingParser {
inherit Parser.XML.Validating;
string get_external_entity(string sysid, string|void pubid,
int|void unparsed, mixed ... extra)
{
Standards.URI uri = Standards.URI(sysid);
if(uri->scheme == "http") {
Protocols.HTTP.Query q = Protocols.HTTP.get_url(uri);
if(q->status == 200)
return q->data();
}
return 0;
}
}
int main(int argc, array(string) argv)
{
string example = #"
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">
<wml>
<card id=\"menu\" title=\"title\">
not allowed here
</card>
</wml>";
int num_errors=0;
MyValidatingParser p = MyValidatingParser();
p->parse(example,
lambda(string kind, string name, mapping attributes,
array|string contents,mapping(string:mixed) info) {
if(kind=="error") {
werror("Error: %s, character position: %d\n",
contents, info->location);
num_errors++;
}
});
if(!num_errors) write("Validated ok.\n");
return num_errors;
}
--end example--
```
I get the following traceback:
```
--begin traceback--
sprintf: Wrong type for argument 2: expected string, got int.
/usr/local/pike/7.7.85/lib/modules/Parser.pmod/XML.pmod/
Validating.pike:262:
/main()->MyValidatingParser()->__lambda_65649_2_line_261("Invalid
content
for element
%s.",0)
/usr/local/pike/7.7.85/lib/modules/Parser.pmod/XML.pmod/
Validating.pike:391:
/main()->MyValidatingParser()->validate
("",0,0,"\n"
"not allowed here\n",mapping[1],/main()->__lambda_65637_0_line_33,
({}))
export/spare/pike/data/pikefarm/out_work/7.7/Pike/7.7/src/modules/Parser/
xml.cmod:943:
/main()->MyValidatingParser()->Context()->parse_xml
()
validate_xml.pike:3:
/main()->MyValidatingParser()->parse(/main()->MyValidatingParser()-
>Contex
t
())
/usr/local/pike/7.7.85/lib/modules/Parser.pmod/XML.pmod/
Validating.pike:444:
/main()->MyValidatingParser()->parse
("\n"
"<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN
\"\n"
" \"http://www.wapforum.org/DTD/wml_1.1.xml\">
\n"
"<wml>
\n"
"<card id=\"menu\" title=\"title\">
\n"
"not allowed here
\n"
"</"+[13],@0)
validate_xml.pike:40:
/main()->main(1,({"/home/forsberg/dev/validate_xml.pike"}))
--end traceback--
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4575ODBC is broken on Windows2009-04-16T14:11:39ZPeter BortasODBC is broken on WindowsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4575
Reported by Marcus Wellhardh <wellhard@roxen.com>
When trying to create a odbc connection on Windows the server crashes.
Tested on 4.5.241 and 4.5.277.
```
C:\Progr...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4575
Reported by Marcus Wellhardh <wellhard@roxen.com>
When trying to create a odbc connection on Windows the server crashes.
Tested on 4.5.241 and 4.5.277.
```
C:\Program Files\Roxen Internet Software\Roxen
CMS-4.5.277\server-4.5.277\pike\bin>pike
Pike v7.4 release 562 running Hilfe v3.5 (Incremental Pike Frontend)
> object db = Sql.Sql("odbc://test:test@rt3");
Unexpected error from thread function: 6
Backtrace at time of fatal:
Sql.odbc: object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Sql.pmod/odbc.pike)->create("rt3","","test","test")
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Sql.pmod/Sql.pike:230:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Sql.pmod/Sql.pike)->create("CENSORED",UNDEFINED,"test","CENSORED",UNDEFINED)
HilfeInput:1: object(HilfeInput)->__INIT()
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1890:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->hilfe_compile("object
db = Sql.Sql(\"odbc://test:test@rt3\");\nmixed ___HilfeWrapper() { return
db; }","db")
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1368:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->add_hilfe_variable("object","db
= Sql.Sql(\"odbc://test:test@rt3\")","db")
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1681:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->parse_expression(object(C:/Program
Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:724))
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1319:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->add_buffer("object
db = Sql.Sql(\"odbc://test:test@rt3\");")
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1270:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->add_input_line("object
db = Sql.Sql(\"odbc://test:test@rt3\");")
C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:2043:
object(C:/Program Files/Roxen Internet Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod:1961)->create()
object_program(Tools.Hilfe): object(C:/Program Files/Roxen Internet
Software/Roxen
CMS-4.5.277/server-4.5.277/pike/lib/modules/Tools.pmod/Hilfe.pmod)->StdinHilfe()
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4573String indexing error2009-04-16T14:11:39ZPeter BortasString indexing errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4573
Reported by Jonas Wallden <jonasw@roxen.com>
"foobar"[1..Int.NATIVE_MAX] no longer works as it did in 7.4.
```
Pike v7.8 release 24 running Hilfe v3.5 (Incremental ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4573
Reported by Jonas Wallden <jonasw@roxen.com>
"foobar"[1..Int.NATIVE_MAX] no longer works as it did in 7.4.
```
Pike v7.8 release 24 running Hilfe v3.5 (Incremental Pike Frontend)
> "foobar"[1..Int.NATIVE_MAX];
(1) Result: ""
> "foobar"[1..Int.NATIVE_MAX - 1];
(2) Result: "oobar"
>
```
Compare this with 7.4 (with the max int expanded since it's not available as a constant):
```
running Hilfe v3.5 (Incremental Pike Frontend)
> "foobar"[1..0x7fffffff];
(1) Result: "oobar"
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4564precompile.sh installed with incorrect permissions2009-04-16T14:11:39ZPeter Bortasprecompile.sh installed with incorrect permissionsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4564
Reported by @zino
precompile.sh is installed without execute permissions in 7.7 which breaks
building of some external modules:
/usr/local/pike/7.7.157/include/pike...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4564
Reported by @zino
precompile.sh is installed without execute permissions in 7.7 which breaks
building of some external modules:
/usr/local/pike/7.7.157/include/pike/precompile.sh --cache precompile.pike
>"upnp.c" "upnp.cmod" || { rm "upnp.c"; exit 1; }
/bin/sh: /usr/local/pike/7.7.157/include/pike/precompile.sh: Permission
deniedPike 7.8Peter BortasPeter Bortashttps://git.lysator.liu.se/pikelang/pike/-/issues/4560Protocols.HTTP.http_encode_query() does not encode strings correctly2009-04-16T14:11:39ZPeter BortasProtocols.HTTP.http_encode_query() does not encode strings correctlyImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4560
Reported by Martin Karlgren <marty@roxen.com>
According to RFC 3986, section 2.5, the last paragraph, URI (sub)strings
should first be UTF-8-encoded and then percent...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4560
Reported by Martin Karlgren <marty@roxen.com>
According to RFC 3986, section 2.5, the last paragraph, URI (sub)strings
should first be UTF-8-encoded and then percent-encoded. That's not the case
with queries returned by http_encode_query().
```
Example:
> Protocols.HTTP.http_encode_query( ([ "foo":"räksmörgås" ]) );
(6) Result: "foo=r\344ksm\366rg\345s"
```
Expected result:
"foo=r%c3%a4ksm%c3%b6rg%c3%a5s"Pike 7.8https://git.lysator.liu.se/pikelang/pike/-/issues/4525Overflow error in mktime when sizeof(time_t) > sizeof(INT_TYPE)2009-04-16T14:11:39ZPeter BortasOverflow error in mktime when sizeof(time_t) > sizeof(INT_TYPE)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4525
Reported by Henry Umansky, Princeton University <humansky@princeton.edu>
Found a bug with the <date> tag. If you enter an ISO time of 1901-01-01
hh:mm, you get the w...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4525
Reported by Henry Umansky, Princeton University <humansky@princeton.edu>
Found a bug with the <date> tag. If you enter an ISO time of 1901-01-01
hh:mm, you get the wrong output.
Ex:
<date iso-time="1901-01-01 13:15" />
outputs (incorrectly):
15:45, December the 13th, 1901
<date iso-time="2001-01-01 13:15" />
outputs (correctly):
13:15, January the 1st, 2001Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/4483Protocols.SMTP.Client()->send_message() lets bare LF's slip through2022-08-28T23:33:13ZPeter BortasProtocols.SMTP.Client()->send_message() lets bare LF's slip throughImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4483
Reported by Mathias Södermark <mathias@roxen.com>
Protocols.SMTP.Client()->send_message() does not convert bare LF's to CR-LF
or throw an error that they are not all...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4483
Reported by Mathias Södermark <mathias@roxen.com>
Protocols.SMTP.Client()->send_message() does not convert bare LF's to CR-LF
or throw an error that they are not allowed.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4465Pike-7.7 fails to build on MacOSX (Darwin 9.1.0) PPC2009-11-19T15:08:41ZPeter BortasPike-7.7 fails to build on MacOSX (Darwin 9.1.0) PPCImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4465
Reported by Philip Yi, Self <philipyi@mac.com>
Build loops on processing Gmp module. Attached is the last part of huge compilelog.txtImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4465
Reported by Philip Yi, Self <philipyi@mac.com>
Build loops on processing Gmp module. Attached is the last part of huge compilelog.txtPike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4464Pike-7.6 Does Not Build on MacOSX (Darwin 9.1.0) PPC2009-04-16T14:11:39ZPeter BortasPike-7.6 Does Not Build on MacOSX (Darwin 9.1.0) PPCImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4464
Reported by Philip Yi, Self <philipyi@mac.com>
Please see the Pikefarm result under machine iMac.local.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4464
Reported by Philip Yi, Self <philipyi@mac.com>
Please see the Pikefarm result under machine iMac.local.Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4436Lost type information2009-04-16T14:11:39ZPeter BortasLost type informationImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4436
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code
```
#pragma strict_types
void main(int n, array(string) args)
{
array(string) a = ({...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4436
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
The following code
```
#pragma strict_types
void main(int n, array(string) args)
{
array(string) a = ({ "a", "bee" });
int i = `+( @map(a, sizeof) );
}
```
will produce the warning
```
/home/nilsson/Pike/7.7/type.pike:7: Warning: An expression of type string |
int | float | mixed cannot be assigned to a variable of type int.
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4434Problem with map type (?)2020-03-01T15:02:31ZPeter BortasProblem with map type (?)Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4434
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
#pragma strict_types
```
string f(int i) { return (string)i; }
```
void main(int n, array(...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4434
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
#pragma strict_types
```
string f(int i) { return (string)i; }
```
void main(int n, array(string) args)
{
array(int) a = (array(int))(args[0]);
sprintf("%@s", map(a, f));
}
```
produces the warning
```
/home/nilsson/Pike/7.7/type.pike:9: Warning: Type mismatch in argument 2 to
sprintf.
/home/nilsson/Pike/7.7/type.pike:9: Warning: Expected: array(object | string)
/home/nilsson/Pike/7.7/type.pike:9: Warning: Got : array(string | mixed)
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4419Strange Calendar.Day bug2009-04-16T14:11:39ZPeter BortasStrange Calendar.Day bugImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4419
Reported by Erik Dahl <erikd@roxen.com>
For some reason, if you access the Calendar.Day object it looses its
year. I can't explain it.
```
Strange bugg:
========== ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4419
Reported by Erik Dahl <erikd@roxen.com>
For some reason, if you access the Calendar.Day object it looses its
year. I can't explain it.
```
Strange bugg:
========== 8< ====================
#! /usr/local/bin/pike
int main() {
Calendar.Day st = Calendar.Day();
write("%O\n", st->range(st + 2)->weeks() );
write("%O\n", st);
write("%O\n", st->range(st + 2)->weeks() );
return 1;
}
========== 8< ====================
```
It returns:
({ /* 2 elements */
Week(w43 2007),
Week(w44 2007)
})
Day(Sat 27 Oct 2007)
({ /* 2 elements */
Week(w43 1 BC),
Week(w44 1 BC)
})
Setting system time to 27th of november returns:
({ /* 1 element */
Week(w48 2007)
})
Day(Tue 27 Nov 2007)
({ /* 1 element */
Week(w48 1 BC)
})
Changing the above code to a Calendar.Hour, Minute, Second object do not
trigger that bug.Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4411Use of uninitialized memory in backend.cmod2009-04-16T14:11:39ZPeter BortasUse of uninitialized memory in backend.cmodImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4411
Reported by Anders Blomdell, Reglerteknik, LTH <anders.blomdell@control.lth.se>
```
The code:
INIT_FD_CALLBACK_BOX (&me->wakeup_cb_box, me, NULL,
pipe[0], ...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4411
Reported by Anders Blomdell, Reglerteknik, LTH <anders.blomdell@control.lth.se>
```
The code:
INIT_FD_CALLBACK_BOX (&me->wakeup_cb_box, me, NULL,
pipe[0], PIKE_BIT_FD_READ, wakeup_callback);
me->wakeup_pipe_send_fd = pipe[1];
```
is obviously bogus, since INIT_FD_CALLBACK_BOX uses wakeup_pipe_send_fd,
has to be changed to:
```
me->wakeup_pipe_send_fd = pipe[1];
INIT_FD_CALLBACK_BOX (&me->wakeup_cb_box, me, NULL,
pipe[0], PIKE_BIT_FD_READ, wakeup_callback);
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4382Can not cast to typedefed type.2020-03-01T17:36:44ZPeter BortasCan not cast to typedefed type.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4382
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
typedef string strong;
void main()
{
(strong)getcwd();
}
```
gives the following error
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4382
Reported by Martin Nilsson, IDA <nilsson@pike.ida.liu.se>
This code
```
typedef string strong;
void main()
{
(strong)getcwd();
}
```
gives the following error
```
test.pike:6:syntax error, unexpected TOK_IDENTIFIER, expecting TOK_LEX_EOF
or ';'
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://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öm