pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2009-04-16T14:11:39Zhttps://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/4651pass variable contains null character to postgres may cause SQL error2009-04-16T14:11:39ZPeter Bortaspass variable contains null character to postgres may cause SQL errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4651
Reported by Eiichiro ITANI, <emu@ceres.dti.ne.jp>
I'm not sure this is bug, or wrong usage of tag.
It cause SQL error to throw query postgres with array variable.
S...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4651
Reported by Eiichiro ITANI, <emu@ceres.dti.ne.jp>
I'm not sure this is bug, or wrong usage of tag.
It cause SQL error to throw query postgres with array variable.
Suppose test.html contains these lines.
```
<emit source="sql" host="postgres-server"
query="SELECT :v AS v" bindings="v=form.v">
&_.v;
</emit>
```
Then, accessing
http://host/test.html?v=1&v=2
causes error
RXML run error: Query failed: ERROR: unterminated quoted string at or near
"'1"
LINE 1: SELECT '1
^
| <emit bindings="v=form.v" host="postgres-server" query="SELECT :v as v"
source="sql">
That error happened because null character directry passed to postgres server.
Of course, I should check and sanitize form.v to be plain string.
And I also noticed, accessing
http://host/test.html?v=abc%00def
this would make reply just "abc". I checked query log of postgres, and
found that query
as follows:
BEGIN
DECLARE _pikecursor CURSOR FOR SELECT 'abc' as v
FETCH 64 IN _pikecursor
FETCH 64 IN _pikecursor
COMMIT
Characters after null chopped.
Aren't they quoting problem of postgresql binding?Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4632Locale problems while building Pike2009-04-16T14:11:39ZPeter BortasLocale problems while building PikeImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4632
Reported by @zino
A Polish developer runs who ran "make" got this output:
```
Compiling tmodule.c
sed -e 's![^ -~]lib_prefix[^ -~]!/home/opera/instalki/pike-current...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4632
Reported by @zino
A Polish developer runs who ran "make" got this output:
```
Compiling tmodule.c
sed -e 's![^ -~]lib_prefix[^ -~]!/home/opera/instalki/pike-current/build/
linux-2.6.27-7-generic-x86_64/lib!' -e 's![^ -~]share_prefix[^ -~]!/home/
opera/instalki/pike-current/lib!' -e 's![^ -~]include_prefix[^ -~]!/home/
opera/instalki/pike-current/build/linux-2.6.27-7-generic-x86_64/bundles/
include/pike!' -e 's,x,x,' </home/opera/instalki/pike-current/lib/
master.pike.in >master.pike
sed: -e expression #1, char 99: Invalid range end
make[2]: *** [master.pike] Error 1
make[1]: *** [_make_in_builddir] Error 2
make: *** [compile] Error 2
```
With the following environment:
Ununtu
sed 4.1.5
make 3.61
tcsh 6.14.00-7ubutu1
LANG=pl_PL.UTF-8
LC_MESSAGES=C
The following patch from Piotr Smyrak fixes it, but I'm unsure about the
implications for legacy systems:
```
--- src/Makefile.in.orig 2008-11-07 15:26:57.000000000 +0100
+++ src/Makefile.in 2008-11-07 15:27:50.000000000 +0100
@@ -924,7 +924,7 @@
then u=s,x,x,; \
else u='s/^#undef PIKE_MODULE_RELOC/#define PIKE_MODULE_RELOC
1/'; \
fi; \
- LC_CTYPE=C; LC_LANG=C; export LC_CTYPE LC_LANG;
+ LC_CTYPE=C; LC_COLLATE=C; export LC_CTYPE LC_COLLATE; \
cmd="sed -e 's![^ -~]lib_prefix[^ -~]!`echo '$(TMP_LIBDIR)' | ./
posix_to_native.sh`!' \
-e 's![^ -~]share_prefix[^ -~]!`echo '$(LIBDIR_SRC)' | ./
posix_to_native.sh`!' \
-e 's![^ -~]include_prefix[^ -~]!`echo '$(TMP_BUILDDIR)/bundles/
include/pike' | ./posix_to_native.sh`!' \
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/4579Hyperactive Directory Administrator does not work in 7.82009-04-16T14:11:39ZPeter BortasHyperactive Directory Administrator does not work in 7.8Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4579
Reported by @zino
Bills Hyperactive Directory Administrator (http://hww3.riverweb.com/
hdadmin/#download) that hasn't been updated since 2002 does not work with
7.8,...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4579
Reported by @zino
Bills Hyperactive Directory Administrator (http://hww3.riverweb.com/
hdadmin/#download) that hasn't been updated since 2002 does not work with
7.8, or 7.6 for that matter. The web page states it's been tested with
7.4.20, but even trying to run it in compatibility mode gives the same
resolver problem:
```
% ~/bin/pike77/bin/pike -M. -V 7.4.20 hdadmin.pike
util.pike:33:Trying to inherit placeholder program (resolver problem).
hdadmin.pike:31:Error finding program
hdadmin.pike:31:Illegal program pointer.
```
Granted, it will probably fail due to lack of GTK on all modern systems,
but that is another problem.
Caveat emptor: The 7.7 I'm using is slightly old and I haven't tried with
7.4. Just jotting it down for future study.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/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/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/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/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