pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2009-04-16T14:11:39Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/3613create_process unable to find executable after chroot2009-04-16T14:11:39ZPeter Bortascreate_process unable to find executable after chrootImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3613
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
The following does not work. There is a test file with exec permissions
/root/test and removing the chroot l...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3613
Reported by Thomas Bopp, Uni-GH Paderborn <astra@upb.de>
The following does not work. There is a test file with exec permissions
/root/test and removing the chroot line will make it work.
It also fails with any other combination of PATH, /root/test, cwd, etc.
```
void main()
{
mapping env = getenv();
System.chroot("/root");
env["PATH"] = "/:/root/";
mapping options = ([
"stdin":Stdio.stdin,
"stdout":Stdio.stdout,
"env": env,
]);
Process.create_process( ({ "test" }), options );
}
```Pike 7.6Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/10073Crypto.AES.CCM Documentation Lacks IV Truncation Information2023-01-01T12:56:05ZJoshua RogersCrypto.AES.CCM Documentation Lacks IV Truncation InformationHi,
Crypto.AES.CCM currently raises an exception if a too-short (less than 7-octets) IV is set using state->set_iv().
According to https://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/Nettle/BlockCipher/CTR/State/set_iv....Hi,
Crypto.AES.CCM currently raises an exception if a too-short (less than 7-octets) IV is set using state->set_iv().
According to https://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/Nettle/BlockCipher/CTR/State/set_iv.html, "iv must have the length reported by iv_size().".
However, a too-long IV set using set_iv() does not raise an exception, and is instead simply truncated to 13-octets:
```
if (iv_len < 7) {
Pike_error("Too short nonce for CCM. Must be at least 7 bytes.\n");
}
if (THIS->nonce) {
free_string(THIS->nonce);
THIS->nonce = NULL;
}
if (iv_len > 13) {
THIS->nonce = string_slice(iv, 0, 12);
iv_len = 13;
} else {
add_ref(THIS->nonce = iv);
}
```
As far as I can tell, this truncation is undocumented, and personally, I see no reason for it to be truncated over an exception being raised.
Can the documentation be changed and/or an exception be raised instead?
Thank you.https://git.lysator.liu.se/pikelang/pike/-/issues/10134Crypto.DSA et al verify messages with various incorrect signatures.2024-01-26T13:03:11ZJoshua RogersCrypto.DSA et al verify messages with various incorrect signatures.Hi there,
I've started to take a look at the latest master branch of Pike and [updated my script](https://github.com/operasoftware/nettle-wycheproof-testsuite) to support the newer version of Pike. A few new issues have been found.
`Cr...Hi there,
I've started to take a look at the latest master branch of Pike and [updated my script](https://github.com/operasoftware/nettle-wycheproof-testsuite) to support the newer version of Pike. A few new issues have been found.
`Crypto.DSA.State->pkcs_verify` successfully verifies a msg,sig pair with `Crypto.SHA256` and `Crypto.SHA224` which:
1. use long form encoding for the length of `r` and/or `s`.,
2. uses a length of sequence `r` and/or `s` contains a leading `0`.
Here, we see two different string representation of the signature verify as the same (both should be rejected):
```pike
int main() {
mapping(string:string) key = ([
"g" : "16a65c58204850704e7502a39757040d34da3a3478c154d4e4a5c02d242ee04f96e61e4bd0904abdac8f37eeb1e09f3182d23c9043cb642f88004160edf9ca09b32076a79c32a627f2473e91879ba2c4e744bd2081544cb55b802c368d1fa83ed489e94e0fa0688e32428a5c78c478c68d0527b71c9a3abb0b0be12c44689639e7d3ce74db101a65aa2b87f64c6826db3ec72f4b5599834bb4edb02f7c90e9a496d3a55d535bebfc45d4f619f63f3dedbb873925c2f224e07731296da887ec1e4748f87efb5fdeb75484316b2232dee553ddaf02112b0d1f02da30973224fe27aeda8b9d4b2922d9ba8be39ed9e103a63c52810bc688b7e2ed4316e1ef17dbde",
"keySize" : 2048,
"p" : "008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
"q" : "00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
"type" : "DsaPublicKey",
"y" : "1e77f842b1ae0fcd9929d394161d41e14614ff7507a9a31f4a1f14d22e2a627a1f4e596624883f1a5b168e9425146f22d5f6ee28757414714bb994ba1129f015d6e04a717edf9b530a5d5cab94f14631e8b4cf79aeb358cc741845553841e8ac461630e804a62f43676ba6794af66899c377b869ea612a7b9fe6611aa96be52eb8b62c979117bbbcca8a7ec1e1ffab1c7dfcfc7048700d3ae3858136e897701d7c2921b5dfef1d1f897f50d96ca1b5c2edc58cada18919e35642f0807eebfa00c99a32f4d095c3188f78ed54711be0325c4b532aeccd6540a567c327225440ea15319bde06510479a1861799e25b57decc73c036d75a0702bd373ca231349931"
]);
string msg;
string sig;
string siq;
msg = "313233343030";
sig = "30813d021d00a545d62d6e336775fb6a9b8495721646a54bd8c6173fc0a2295a1b7b021c3be6bae0e8763818840a9151ad8ed2b3b348e4a2c488d3fbdbbca844"; //use long form encoding for the length of [r, s],
siq = "3082003d021d00a545d62d6e336775fb6a9b8495721646a54bd8c6173fc0a2295a1b7b021c3be6bae0e8763818840a9151ad8ed2b3b348e4a2c488d3fbdbbca844"; //length of sequence [r, s] contains a leading 0
msg = String.hex2string(msg);
sig = String.hex2string(sig);
mixed state = Crypto.DSA.State();
state->set_public_key(Gmp.mpz(key["p"], 16), Gmp.mpz(key["q"], 16), Gmp.mpz(key["g"], 16), Gmp.mpz(key["y"], 16));
bool res = state->pkcs_verify(msg, Crypto.SHA256, sig);
if(res)
write("success!\n");
sig = String.hex2string(siq);
res = state->pkcs_verify(msg, Crypto.SHA256, sig);
if(res)
write("success!\n");
return 0;
}
```
This seems similar to https://git.lysator.liu.se/pikelang/pike/-/issues/10077, and I'm not sure why I didn't pick it up ealier.
Cheers,
JoshPike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/10078Crypto.ECC.SECP_521R1 does not verify valid signatures.2023-05-15T08:16:54ZJoshua RogersCrypto.ECC.SECP_521R1 does not verify valid signatures.Hi there,
While conducting some tests of Crypto.ECC.SECP_521R1->ECDSA(), I've come across a testcase which should be successfully verified, but it is not.
The code is as follows:
```
int main() {
string x = "00ee030cdb40abf7072686668...Hi there,
While conducting some tests of Crypto.ECC.SECP_521R1->ECDSA(), I've come across a testcase which should be successfully verified, but it is not.
The code is as follows:
```
int main() {
string x = "00ee030cdb40abf70726866681f7b7fedc534190929c05a650bb928b894a5bbfe9577eea83c6331a796fa27ed9fac95d9ecacdfef6d61c925502b0afddc671463549";
string y = "0155606dd4cab19330c57c2ee740cd9c7c88bd88d95f840f315d525379dfeb7ea9bd3677b2185b92957f374317cc6124aacc8708075c4c05c95cbbc355bd692c3708";
string msg = "313233343030";
string sig = "30818702420090c8d0d718cb9d8d81094e6d068fb13c16b4df8c77bac676dddfe3e68855bed06b9ba8d0f8a80edce03a9fac7da561e24b1cd22d459239a146695a671f81f73aaf02413ee5a0a544b0842134629640adf5f0637087b04a442b1e6a22555dc1d8b93f8784f1ddd0cf90f75944cc2cd7ae373e5c2bac356a60ff9d08adfcdba3fa1b7a9d1d";
mixed state = Crypto.ECC.SECP_521R1->ECDSA();
state->set_public_key(Gmp.mpz(x, 16), Gmp.mpz(y, 16));
if(state->pkcs_verify(String.hex2string(msg), Crypto.SHA3_512, String.hex2string(sig)))
write("Success!\n");
return 0;
}
```
The test codes from https://github.com/google/wycheproof/blob/master/testvectors/ecdsa_secp521r1_sha512_test.json#L4279, and the explanation for the test is as follows: "Some implementations of ECDSA do not handle duplication and points at infinity correctly. This is a test vector that has been specially crafted to check for such an omission"
Please note: I have not tested this in Nettle itself, because I'm not 100% sure how to use the related functions in the C code.
Thank you.https://git.lysator.liu.se/pikelang/pike/-/issues/1246ctime/hilfe type error2009-04-16T14:11:39ZPeter Bortasctime/hilfe type errorImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1246
Reported by Johan Schön <js@roxen.com>
```
Pike v7.3 release 2 running Hilfe v2.0 (Incremental Pike Frontend)
> ctime(983202590);
-:1:Bad argument 1 to ctime.
-:1:Ex...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1246
Reported by Johan Schön <js@roxen.com>
```
Pike v7.3 release 2 running Hilfe v2.0 (Incremental Pike Frontend)
> ctime(983202590);
-:1:Bad argument 1 to ctime.
-:1:Expected: function(int(-536870912..536870911) : string)
-:1:Got : function(int(983202590..983202590) : void | mixed)
> ctime((int)983202590);
Result: "Mon Feb 26 16:49:50 2001\n"
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/1940CVS code from Aug 8 ...HAVE_STRCOLL no template on UnixWare 7.1.12009-04-16T14:11:39ZPeter BortasCVS code from Aug 8 ...HAVE_STRCOLL no template on UnixWare 7.1.1Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1940
Reported by Boyd Lynn Gerber, ZENEZ <gerberb@zenez.com>
cd /usr/local/build/uw7/pike/7.0/src && autoheader
autoheader: No template for symbol `HAVE_STRCOLL'
make: **...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1940
Reported by Boyd Lynn Gerber, ZENEZ <gerberb@zenez.com>
cd /usr/local/build/uw7/pike/7.0/src && autoheader
autoheader: No template for symbol `HAVE_STRCOLL'
make: *** [/usr/local/build/uw7/pike/7.0/src/stamp-h.in] Error 1
I did this patche to dynamic_module_makefile.in
Right After the REAL_CPPFLAGS I added
```
case "$UNAME" in
UnixWare\ 7.*)
LC_REQ=""
;;
OpenServer\ 5.*)
LC_REQ=""
;;
*)
LC_REQ="-lc"
;;
esac
```
and then later in the module.so
```
# FIXME:
# Move -lc $(LIBGCC) into a configurable variable and make sure it is
#empty on UnixWare
#
```
I changed the -lc to $(LC_REQ)
This is my attempt to fix the -lc problem.
I ran from the 7.0 directory
./src/autogen.sh
/usr/local/bin/make
cd build/unixware-5-i386
/usr/local/bin/make
...
cd /usr/local/build/uw7/pike/7.0/src && autoheader
autoheader: No template for symbol `HAVE_STRCOLL'
make: *** [/usr/local/build/uw7/pike/7.0/src/stamp-h.in] Error 1
Thanks
Boyd Gerber
gerberb@zenez.comPike 7.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3357Date bug in X509.pmod2009-04-16T14:11:39ZPeter BortasDate bug in X509.pmodImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3357
Reported by Marcus Wellhardh <wellhard@roxen.com>
The parse_time function in Tools.pmod/X509.pmod does not accept the last
day in a month.
Change:
if ( (m->mday <...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3357
Reported by Marcus Wellhardh <wellhard@roxen.com>
The parse_time function in Tools.pmod/X509.pmod does not accept the last
day in a month.
Change:
if ( (m->mday <= 0) || (m->mday >= Calendar.ISO.Year(m->year + 1900)
->month(m->mon + 1)->number_of_days()))
To:
if ( (m->mday <= 0) || (m->mday > Calendar.ISO.Year(m->year + 1900)
->month(m->mon + 1)->number_of_days()))Pike 7.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/3676Deadly lock2015-03-27T17:57:28ZPeter BortasDeadly lockImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3676
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
```
(gdb) info threads
20 Thread 11 0xff3581ac in cond_wait () from /usr/lib/libthr...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3676
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
```
(gdb) info threads
20 Thread 11 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
19 Thread 10 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
18 Thread 9 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
17 Thread 8 (LWP 6) 0xff19e838 in _read () from /usr/lib/libc.so.1
16 Thread 6 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
15 Thread 5 (LWP 3) 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
14 Thread 4 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
13 Thread 3 0xff35d9b8 in _reap_wait () from /usr/lib/libthread.so.1
12 Thread 2 (LWP 2) 0xff19ed78 in _signotifywait () from /usr/lib/libc.so.1
11 Thread 1 (LWP 4) 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
10 LWP 2 0xff19ed78 in _signotifywait () from /usr/lib/libc.so.1
9 LWP 3 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
8 LWP 4 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
7 LWP 5 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
6 LWP 6 0xff19e838 in _read () from /usr/lib/libc.so.1
5 LWP 7 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
4 LWP 8 0xff3691fc in private___lwp_cond_wait ()
from /usr/lib/libthread.so.1
3 LWP 9 0xff19c91c in door_restart () from /usr/lib/libc.so.1
* 2 Thread 7 (LWP 1) 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
1 LWP 1 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
(gdb) thread 20
[Switching to thread 20 (Thread 11 )]#0 0xff3581ac in cond_wait ()
from /usr/lib/libthread.so.1
(gdb) bt
#0 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
#1 0xff358078 in pthread_cond_wait () from /usr/lib/libthread.so.1
#2 0x000dca78 in farm (_a=0x165ce30)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/threads.c:1837
#3 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
#4 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 19
[Switching to thread 19 (Thread 10 )]#0 0xff3581ac in cond_wait ()
from /usr/lib/libthread.so.1
(gdb) bt
#0 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
#1 0xff358078 in pthread_cond_wait () from /usr/lib/libthread.so.1
#2 0x000db99c in f_cond_wait (args=1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/threads.c:1425
#3 0x0003c610 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x282c00,
arg2=0x1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/apply_low.h:195
#4 0x0003968c in opcode_F_CALL_LFUN_AND_POP (arg1=8)
at
/home/distmaker/tmp/build/pike.srcbuild/../pike-cvs/src/interpret_functions.h:1854
#5 0x0073f760 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 18
[Switching to thread 18 (Thread 9 )]#0 0xff19f428 in _lwp_sema_wait ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
#1 0xff3596e4 in _park () from /usr/lib/libthread.so.1
#2 0xff3593ac in _swtch () from /usr/lib/libthread.so.1
#3 0xff3581b4 in cond_wait () from /usr/lib/libthread.so.1
#4 0xff358078 in pthread_cond_wait () from /usr/lib/libthread.so.1
#5 0x000db99c in f_cond_wait (args=1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/threads.c:1425
#6 0x0003c610 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x282c00,
arg2=0x1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/apply_low.h:195
#7 0x0003968c in opcode_F_CALL_LFUN_AND_POP (arg1=8)
at
/home/distmaker/tmp/build/pike.srcbuild/../pike-cvs/src/interpret_functions.h:1854
#8 0x0073f760 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 17
[Switching to thread 17 (Thread 8 (LWP 6))]#0 0xff19e838 in _read ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19e838 in _read () from /usr/lib/libc.so.1
#1 0xff369fb0 in read () from /usr/lib/libthread.so.1
#2 0xff369fb0 in read () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 16
[Switching to thread 16 (Thread 6 )]#0 0xff19f428 in _lwp_sema_wait ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19f428 in _lwp_sema_wait () from /usr/lib/libc.so.1
#1 0xff3596e4 in _park () from /usr/lib/libthread.so.1
#2 0xff3593ac in _swtch () from /usr/lib/libthread.so.1
#3 0xff3581b4 in cond_wait () from /usr/lib/libthread.so.1
#4 0xff358078 in pthread_cond_wait () from /usr/lib/libthread.so.1
#5 0x000db99c in f_cond_wait (args=1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/threads.c:1425
#6 0x0003c610 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x282c00,
arg2=0x1)
at /home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/apply_low.h:195
#7 0x0003968c in opcode_F_CALL_LFUN_AND_POP (arg1=8)
at
/home/distmaker/tmp/build/pike.srcbuild/../pike-cvs/src/interpret_functions.h:1854
#8 0x0073f760 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 15
[Switching to thread 15 (Thread 5 (LWP 3))]#0 0xff19d5b4 in _poll ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
#1 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
#2 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 14
[Switching to thread 14 (Thread 4 )]#0 0xff3581ac in cond_wait ()
from /usr/lib/libthread.so.1
(gdb) bt
#0 0xff3581ac in cond_wait () from /usr/lib/libthread.so.1
#1 0xff358078 in pthread_cond_wait () from /usr/lib/libthread.so.1
#2 0x00089904 in wait_thread (data=0x0)
at
/home/distmaker/Distmaker/4.0/build/pike.sol8/pike/src/signal_handler.c:1135
#3 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
#4 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 13
[Switching to thread 13 (Thread 3 )]#0 0xff35d9b8 in _reap_wait ()
from /usr/lib/libthread.so.1
(gdb) bt
#0 0xff35d9b8 in _reap_wait () from /usr/lib/libthread.so.1
#1 0xff35d718 in _reaper () from /usr/lib/libthread.so.1
#2 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
#3 0xff36b024 in _thread_start () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 12
[Switching to thread 12 (Thread 2 (LWP 2))]#0 0xff19ed78 in _signotifywait ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19ed78 in _signotifywait () from /usr/lib/libc.so.1
#1 0xff35e958 in _dynamiclwps () from /usr/lib/libthread.so.1
#2 0xff361c34 in thr_yield () from /usr/lib/libthread.so.1
(gdb) thread 11
[Switching to thread 11 (Thread 1 (LWP 4))]#0 0xff19d5b4 in _poll ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
#1 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
#2 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) thread 2
[Switching to thread 2 (Thread 7 (LWP 1))]#0 0xff19d5b4 in _poll ()
from /usr/lib/libc.so.1
(gdb) bt
#0 0xff19d5b4 in _poll () from /usr/lib/libc.so.1
#1 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
#2 0xff36a7e4 in poll () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)
(gdb) call gdb_backtraces()
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 4)]
0x000348d0 in opcode_F_ASSIGN_LOCAL (arg1=8)
at
/home/distmaker/tmp/build/pike.srcbuild/../pike-cvs/src/interpret_functions.h:880
880 OPCODE1(F_ASSIGN_LOCAL, "assign local", 0, {
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (gdb_backtraces) will
be abandoned.
(gdb)
```Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/8223debug_fatal(fmt="Using %s freed svalue2019-10-28T14:43:54ZPeter Bortasdebug_fatal(fmt="Using %s freed svalueImported from https://youtrack.roxen.com/issue/PIKE-223
Reported by KG Sterneberg <kg@roxen.com>
```
**Looking for references to 0x0:
**Done looking for references to 0x0, found 0 refs.
Image Processor: PDF Processor: Ghostscript test ...Imported from https://youtrack.roxen.com/issue/PIKE-223
Reported by KG Sterneberg <kg@roxen.com>
```
**Looking for references to 0x0:
**Done looking for references to 0x0, found 0 refs.
Image Processor: PDF Processor: Ghostscript test succeeded.
[archive-main.pike@882 in Test REP Archive]: > GET /list-indices
InDesign server request #1:i0 (spool dir check) http error: Host unreachable. (code 700)
**Looking for references to 0x0:
**Done looking for references to 0x0, found 0 refs.
**Looking for references to 0x0:
/Users/kg/dev/Pike/pike/src/svalue.c:2040: Fatal error:
Process 62347 stopped
* thread #26, stop reason = breakpoint 1.1
frame #0: 0x00000001000820ff roxen`debug_fatal(fmt="Using %s freed svalue at %p.\n") at error.c:579:3
576 PMOD_EXPORT DECLSPEC(noreturn) void debug_fatal(const char *fmt, ...) ATTRIBUTE((noreturn))
577 {
578 va_list args;
-> 579 va_start(args,fmt);
580 debug_va_fatal (fmt, args);
581 va_end (args);
582 }
Target 0: (roxen) stopped.
(lldb) bt
* thread #26, stop reason = breakpoint 1.1
* frame #0: 0x00000001000820ff roxen`debug_fatal(fmt="Using %s freed svalue at %p.\n") at error.c:579:3
frame #1: 0x00000001001b09a4 roxen`debug_svalue_type_error(s=0x000000010eae1030) at svalue.c:2040:5
frame #2: 0x00000001001b7d15 roxen`debug_check_svalue(s=0x000000010eae1030) at svalue.c:2056:3
frame #3: 0x00000001001b7e5e roxen`real_gc_mark_external_svalues(s=0x000000010eae1030, num=8, place=" on svalue stack") at svalue.c:2102:7
frame #4: 0x000000010000ed94 roxen`gc_mark_stack_external(f=0x000000010101a008, stack_p=0x000000010eae10b0, stack=0x000000010eae1000) at interpret.c:150:6
frame #5: 0x0000000100061439 roxen`low_call_callback(lst=0x000000010032cb58, arg=0x0000000000000000) at callback.c:90:7
frame #6: 0x000000010008dcc1 roxen`locate_references(a=0x0000000000000000) at gc.c:2123:5
frame #7: 0x00000001001efc9a roxen`f__locate_references(args=1) at builtin_functions.c:8574:5
frame #8: 0x000000010a21b839
frame #9: 0x0000000100032882 roxen`eval_instruction [inlined] eval_instruction_low(pc=<unavailable>) at interpret.c:1711:5
frame #10: 0x000000010003287d roxen`eval_instruction(pc="") at interpret.c:1663
frame #11: 0x0000000100017952 roxen`mega_apply_low(args=246288624, arg1=0x000000010c1a07e0, arg2=16) at interpret.c:2722:5
frame #12: 0x0000000100107e24 roxen`call_destroy(o=0x000000010c1a07e0, reason=<unavailable>) at object.c:808:2
frame #13: 0x0000000100107305 roxen`destruct_object(o=0x000000010c1a07e0, reason=DESTRUCT_EXPLICIT) at object.c:886:7
frame #14: 0x00000001001dee6d roxen`f_destruct(args=1) at builtin_functions.c:3353:3
frame #15: 0x000000010d4bc909
frame #16: 0x0000000100032882 roxen`eval_instruction [inlined] eval_instruction_low(pc=<unavailable>) at interpret.c:1711:5
frame #17: 0x000000010003287d roxen`eval_instruction(pc="") at interpret.c:1663
frame #18: 0x0000000100017952 roxen`mega_apply_low(args=246288592, arg1=0x000000010c1a0f18, arg2=4) at interpret.c:2722:5
frame #19: 0x0000000100107e24 roxen`call_destroy(o=0x000000010c1a0f18, reason=<unavailable>) at object.c:808:2
frame #20: 0x0000000100107305 roxen`destruct_object(o=0x000000010c1a0f18, reason=DESTRUCT_NO_REFS) at object.c:886:7
frame #21: 0x00000001001055c2 roxen`schedule_really_free_object(o=0x000000010c1a0f18) at object.c:1116:5
frame #22: 0x00000001000225f0 roxen`low_return at interpret.c:2546:3
frame #23: 0x000000010002ea41 roxen`mega_apply(type=<unavailable>, args=1, arg1=0x0000000000000000, arg2=0x0000000000000000) at interpret.c:2700:5
frame #24: 0x000000010005714c roxen`backend_do_call_outs(me=0x000000010ca5f650) at backend.cmod:1049:1
frame #25: 0x000000010005acda roxen`pdb_low_backend_once(pdb=0x000000010ca5f600, timeout=0x0000700001964b80) at backend.cmod:4182:1
frame #26: 0x000000010005b0d8 roxen`f_PollDeviceBackend_cq__backtick_28_29(args=0) at backend.cmod:4314:1
frame #27: 0x00000001000296af roxen`low_mega_apply(type=<unavailable>, args=<unavailable>, arg1=<unavailable>, arg2=<unavailable>) at apply_low.h:221:2
frame #28: 0x00000001000284c4 roxen`jump_opcode_F_MARK_CALL_LFUN_AND_POP(arg1=25) at interpret_functions.h:2418:1
frame #29: 0x000000010d09c4de
frame #30: 0x0000000100032882 roxen`eval_instruction [inlined] eval_instruction_low(pc=<unavailable>) at interpret.c:1711:5
frame #31: 0x000000010003287d roxen`eval_instruction(pc="") at interpret.c:1663
frame #32: 0x000000010002ea3c roxen`mega_apply(type=<unavailable>, args=1, arg1=0x0000000000000000, arg2=0x0000000000000000) at interpret.c:2695:5
frame #33: 0x000000010017d0aa roxen`new_thread_func(data=<unavailable>) at threads.c:1930:5
frame #34: 0x00007fff5c9c72eb libsystem_pthread.dylib`_pthread_body + 126
frame #35: 0x00007fff5c9ca249 libsystem_pthread.dylib`_pthread_start + 66
frame #36: 0x00007fff5c9c640d libsystem_pthread.dylib`thread_start + 13
```https://git.lysator.liu.se/pikelang/pike/-/issues/6146Decode bug in portable byte code2012-01-16T12:13:18ZPeter BortasDecode bug in portable byte codeImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6146
Reported by Martin Stjernholm <mast@roxen.com>
decode_value fails with the following error.
```
Internal server error: Missing line directive in byte code.
-:1: Pik...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6146
Reported by Martin Stjernholm <mast@roxen.com>
decode_value fails with the following error.
```
Internal server error: Missing line directive in byte code.
-:1: PikeCompiler(UNDEFINED, UNDEFINED, -1, -1, UNDEFINED, UNDEFINED)->compile()
D:/Sites/Roxen CMS/server-5.1.185/etc/modules/RXML.pmod/module.pmod (rev 1.420):9823: RXML->string_to_p_code("¶ke0cd#\6\1RRXML\6\1PCode\0\4æ7.2\b\f#àæRts#à\6\1Rconf(Ç'Ë˼\27\26\6\brxml_tag_set\6\f0?0Ý\225¸Òä¨Y½\233\204.äý#à\6\1Rtype\6\5text/htmlæxmlhà#\0\0\6\0Rtag#à\17\2#à\6\0Rmod\17\3\6\6rxmltags#0&\1
7\6\6\1cache\17\6\0\3dc\5\0\2I/6á\0\a\0"+[5483929],Configuration(online.fe),1)
/.../
Note that the backtrace blames PikeCompiler()->compile(), but on module.pmod:9823 is a call to decode_value.
```
The encoded string has been created in another pike installation. Investigations suggest that it's not a different version of pike, though. It seems like the same string can be decoded in the server it came from, but there's no hard evidence on that.
The problem appears to be specific to this particular instance of the dumped code - other similar cases work.
If this is due to different pike build or resolver environment, pike should be able to report such issues differently from pure format problems. (On a related note, decode_value is badly in need of proper error objects that can be classified in a sane way.)
```
See also RT #17001.
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/19decode_value() doesn't reconstruct multisets properly.2009-04-16T14:11:39ZPeter Bortasdecode_value() doesn't reconstruct multisets properly.Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=19
Reported by @grubba
```
> string s = encode_value((<1>));
Result: "¶ke0bh"
> string s2 = encode_value((<1,1>));
Result: "¶ke0¢h¿"
> decode_value(s);
Result: (< /* 1 el...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=19
Reported by @grubba
```
> string s = encode_value((<1>));
Result: "¶ke0bh"
> string s2 = encode_value((<1,1>));
Result: "¶ke0¢h¿"
> decode_value(s);
Result: (< /* 1 element */
1
>)
> decode_value(s2);
Result: (< /* 1 element */
1
>)
```Pike 7.2Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/6413Decoding the attached (corrupt?) image, segfaults in 7.82012-06-29T17:02:30ZPeter BortasDecoding the attached (corrupt?) image, segfaults in 7.8Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6413
Reported by Erik Dahl <erikd@roxen.com>
```
> object img = Image.ANY.decode(Stdio.File("dans-inv.jpg")->read());
Segmentation fault: 11
```Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6413
Reported by Erik Dahl <erikd@roxen.com>
```
> object img = Image.ANY.decode(Stdio.File("dans-inv.jpg")->read());
Segmentation fault: 11
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/10104Define the behavior of catch vis a vis local variables defined in the block.2022-12-21T15:42:21ZHenrik (Grubba) GrubbströmDefine the behavior of catch vis a vis local variables defined in the block.There exists code (eg `Parser.Tabular`) that uses exceptions for control flow, and expects variables defined in the catch block to be cleared when the catch returns. Having the variables be cleared at a later time or out of order may cau...There exists code (eg `Parser.Tabular`) that uses exceptions for control flow, and expects variables defined in the catch block to be cleared when the catch returns. Having the variables be cleared at a later time or out of order may cause the code to fail.
Consider:
```
int bangers;
#if __VERSION__ < 9.0
#define _destruct destroy
#endif
class Bang
{
inherit Pike.DestructImmediate;
protected void create()
{
bangers++;
}
protected int _destruct()
{
bangers--;
error("Bang!\n");
}
}
mixed a(int i)
{
mixed err = catch {
Bang bang = Bang();
if (i) error("Other!\n");
};
werror("#%d: Bangers: %d\n", i, bangers);
if (err) {
werror("Error: %O\n", err = describe_error(err));
} else {
werror("No error.\n");
}
return err;
}
int main()
{
for (int i = 0; i < 2; i++) {
mixed err = catch {
mixed val = a(i);
werror("#%d: bangers: %d, val: %O\n", i, bangers, val);
};
if (err) {
werror("#%d: a(%d) failed: %O\n", i, i, describe_error(err));
}
}
}
```
This issue causes the `Parser.Tabular` testsuite to hang.Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/8224describe_backtrace() argument shorting sometimes extends the argument.2020-03-05T18:05:00ZPeter Bortasdescribe_backtrace() argument shorting sometimes extends the argument.Imported from https://youtrack.roxen.com/issue/PIKE-224
Reported by @grubba
From Roxen 6.3.333 selftest:
```
>> ### Thread 0x8 - Handle Thread [4] - busy for 602.854s:
>> pike/lib/master.pike:1838: file_stat("/var/tmp/dist-test/roxen-6...Imported from https://youtrack.roxen.com/issue/PIKE-224
Reported by @grubba
From Roxen 6.3.333 selftest:
```
>> ### Thread 0x8 - Handle Thread [4] - busy for 602.854s:
>> pike/lib/master.pike:1838: file_stat("/var/tmp/dist-test/roxen-6.3.333-nb-ep-sol11_x86_64.sh/roxen/var/rep_test_repository/Test_REP.sb/print/db/spool/testdir3/test_x_put_copy_mo"+[-9]+"t_copy_move_delete/Cyrillic-Ñ\204Ñ\211Ñ\212Ã\202Ã\203Ã\204Ã\211Ã\226",UNDEFINED)
>> pike/lib/modules/Stdio.pmod/module.pmod:2830: Stdio.exist("/var/tmp/dist-test/roxen-6.3.333-nb-ep-sol11_x86_64.sh/roxen/var/rep_test_repository/Test_REP.sb/print/db/spool/testdir3/test_x_put_copy_move_delete/Cyrillic-Ñ\204Ñ\211Ñ\212Ã\202Ã\203Ã\204Ã\211Ã\226")
```
Note the `[-9]` in the attempt to shorten the argument to `file_stat()`.
Observed in Pike 8.0.888.https://git.lysator.liu.se/pikelang/pike/-/issues/8084destroy() in Protocols.HTTP.Query causes ABS restart.2020-03-05T17:28:51ZPeter Bortasdestroy() in Protocols.HTTP.Query causes ABS restart.Imported from https://youtrack.roxen.com/issue/PIKE-84
Reported by Marcus Wellhardh <wellhard@roxen.com>
A production CMS is restarted about once a day caused by a blocked backend thread. The entire debug log is attached. The ABS tread...Imported from https://youtrack.roxen.com/issue/PIKE-84
Reported by Marcus Wellhardh <wellhard@roxen.com>
A production CMS is restarted about once a day caused by a blocked backend thread. The entire debug log is attached. The ABS tread dump contains the following interesting parts, the rest of the threads are idle:
```
3:15:33 : Pike version: Pike v8.0 release 482
3:15:33 : Product version: Roxen CMS 6.1.224-r3
3:15:33 0m 0.0s : Operating system: Linux 2.6.32-642.11.1.el6.x86_64 (x86_64)
3:15:33 : Starting MySQL ... Was running 10.1.12-MariaDB [6.9ms]
[...]
3:15:33 : 2018-01-26T144820
[...]
21:38:34 : **** Tue Mar 27 21:38:34 2018: ABS engaged!
21:38:34 1d19h38m : Waited more than 10 minute(s).
21:38:34 :
21:38:34 : Trying to dump backlog:
21:38:34 : ###### Describing all 80 pike threads:
21:38:34 : >>
21:38:34 1d19h38m : >> ### Thread 0x7f8c6bf10700 - Backend - busy for 611.284s:
21:38:34 : >> -:1: Thread.Thread(0x7f8c6bf10700)->backtrace()
21:38:34 : >> base_server/roxen.pike (6a418c49):6098: roxen()->describe_thread(Thread.Thread(0x7f8c6bf10700))
21:38:34 : >> base_server/roxen.pike (6a418c49):6152: roxen()->describe_all_threads(UNDEFINED,UNDEFINED)
21:38:34 : >> base_server/roxen.pike (6a418c49):3667: roxen()->engage_abs(14)
21:38:34 1d19h38m : >> -:1: Pike.Backend(26958)->`()(0)
21:38:34 : >> pike/lib/modules/SSL.pmod/File.pike:284: SSL.File(Stdio.File("socket", "31.13.69.228:443", 777 /* fd=119 */), SSL.ClientConnection(local_closed))->backend_once(0)
21:38:34 : >> pike/lib/modules/SSL.pmod/File.pike:1963: SSL.File(Stdio.File("socket", "31.13.69.228:443", 777 /* fd=119 */), SSL.ClientConnection(local_closed))->direct_write()
21:38:34 : >> pike/lib/modules/SSL.pmod/File.pike:678: SSL.File(Stdio.File("socket", "31.13.69.228:443", 777 /* fd=119 */), SSL.ClientConnection(local_closed))->close(UNDEFINED,UNDEFINED,UNDEFINED)
21:38:34 : >> pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:187: Protocols.HTTP.Query(404 Not Found)->close_connection()
21:38:34 1d19h38m : >> pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1234: Protocols.HTTP.Query(404 Not Found)->close()
21:38:34 : >> pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1227: Protocols.HTTP.Query(404 Not Found)->destroy()
21:38:34 : >> base_server/roxenloader.pike (06a2c389):254: Protocols.HTTP.Query(301 Moved Permanently)->clean_async_dns->`()()
21:38:34 : >> -:1: Pike.Backend(0)->`()(3600.0)
21:38:34 : >>
```
#### Attachments:
- [default.3](/uploads/102d7a1db3dbfce82291d536e6442d9f/default.3 "default.3")https://git.lysator.liu.se/pikelang/pike/-/issues/3862Destructed object not properly treated as zero2011-02-03T15:59:35ZPeter BortasDestructed object not properly treated as zeroImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3862
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
Reloading the Sitebuilder Main module twice gave this backtrace:
```
Incompatible types
Unkno...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3862
Reported by Fredrik Noring, Roxen Internet Software <noring@roxen.com>
Reloading the Sitebuilder Main module twice gave this backtrace:
```
Incompatible types
Unknown program: `+("VCFile(N/E:0:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/VCFile.pike
(version 1.337):58: Sitebuilder.FS.VCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.VCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.VCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
Incompatible types
Unknown program: `+("NoVCFile(N/E:0:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/NoVCFile.pike
(version 1.15):58: Sitebuilder.FS.NoVCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.NoVCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.NoVCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
Incompatible types
Unknown program: `+("VCFile(N/E:2:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/VCFile.pike
(version 1.337):58: Sitebuilder.FS.VCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.VCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.VCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
Incompatible types
Unknown program: `+("VCFile(N/E:0:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/VCFile.pike
(version 1.337):58: Sitebuilder.FS.VCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.VCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.VCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
Incompatible types
Unknown program: `+("NoVCFile(N/E:0:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/NoVCFile.pike
(version 1.15):58: Sitebuilder.FS.NoVCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.NoVCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.NoVCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
Incompatible types
Unknown program: `+("VCFile(N/E:2:[(unknown)]:",0)
modules/sitebuilder/pike-modules/Sitebuilder.pmod/FS.pmod/VCFile.pike
(version 1.337):58: Sitebuilder.FS.VCFile()->_sprintf()
pike/lib/pike/master.pike (version 1.259):117: master()->error("Failed to
find name of unencodable object %O.\n",Sitebuilder.FS.VCFile())
pike/lib/pike/master.pike (version 1.259):3490:
master()->nameof(Sitebuilder.FS.VCFile(),UNDEFINED)
base_server/cache.pike (version 1.85):216:
/usr/local/tmp/service/roxen/server-4.0.308/base_server/cache()->cache_clean()
base_server/roxen.pike (version 1.886):1004: roxen->bg_process_queue()
base_server/roxen.pike (version 1.886):642: roxen->handler_thread(1)
```Pike 7.4Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/8135Distmaker selftest errors on Windows2018-10-18T12:45:37ZPeter BortasDistmaker selftest errors on WindowsImported from https://youtrack.roxen.com/issue/PIKE-135
Reported by Jonas Walldén <jonasw@roxen.com>
See attached log.Imported from https://youtrack.roxen.com/issue/PIKE-135
Reported by Jonas Walldén <jonasw@roxen.com>
See attached log.https://git.lysator.liu.se/pikelang/pike/-/issues/6285DNS.async_client fails on windows2015-03-31T14:51:20ZPeter BortasDNS.async_client fails on windowsImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6285
Reported by Martin Stjernholm <mast@roxen.com>
Seen during site creation:
```
: Internal server error: Cannot call functions in destructed objects.
Unknow...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=6285
Reported by Martin Stjernholm <mast@roxen.com>
Seen during site creation:
```
: Internal server error: Cannot call functions in destructed objects.
Unknown program: destructed object->function()
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike (4893bd35):334: unknown function(0,80)
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike (4893bd35):461: unknown function("www.roxen.com",0,function)
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/DNS.pmod (9a6231d3):1541: Protocols.DNS.async_client()->generic_get("www.roxen.com",0,-1,0,1,"a","www.roxen.com",function,function,80)
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/DNS.pmod (9a6231d3):1454: Protocols.DNS.async_client()->remove(Protocols.DNS.async_client()->Request())
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/DNS.pmod (9a6231d3):1620: Protocols.DNS.async_client()->close()
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike (4893bd35):447: unknown function()
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/base_server/roxenloader.pike (rev 1.475):246: 0->`()()
-:1: Pike.Backend(0)->`()(3600.0)
Internal server error: UDP: not open
-:1: Protocols.DNS.async_client()->send("127.0.0.1",53,"º\1\0\0\1\0\0\0\0\0\0\3www\5roxen\3com\0\0\1\0\1")
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/pike/lib/modules/Protocols.pmod/DNS.pmod (9a6231d3):1471: Protocols.DNS.async_client()->retry(Protocols.DNS.async_client()->Request(),0)
C:/Program Files (x86)/Roxen Internet Software/Roxen CMS/server-5.2.187/base_server/roxenloader.pike (rev 1.475):246: Protocols.DNS.async_client()->retry->`()(@0=Protocols.DNS.async_client()->Request(),1)
-:1: Pike.Backend(0)->`()(3600.0)
```Pike 7.8Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/2689Documentation targets fail completely if there's no jpeg support2009-04-16T14:11:39ZPeter BortasDocumentation targets fail completely if there's no jpeg supportImported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2689
Reported by Martin Stjernholm <mast@roxen.com>
I think better error handling is needed here; an external lib shouldn't be
required to get any documentation at all.
...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2689
Reported by Martin Stjernholm <mast@roxen.com>
I think better error handling is needed here; an external lib shouldn't be
required to get any documentation at all.
```
mkxml: Image.Color.Color-> : Image.Color.Color->grey
mkxml: Image.Color.Color-> :
Image.Color.Color->name,Image.Color.Color->html,Image.Color.Color->hex
mkxml: Image.Color.Color-> : Image.Color.Color->`==
mkxml: Image.Color colors : Image.Color colors
-:32:Index 'encode' not present in module 'JPEG'.
"file='/home/mast/Pike/devel/refdoc/../src/modules/Image/colors.c'
first-line='89'"
******
0000:
0001: class Interceptor {
0002: string buffer = "";
0003:
0004: void `()(string in) {
0005: buffer += in;
0006: }
0007:
0008: string get() {
0009: return buffer;
0010: }
0011: }
0012:
0013: Interceptor write = Interceptor();
0014:
0015: int img_counter;
0016: string prefix;
0017: void create(int _img_counter, string _prefix) {
0018: img_counter = _img_counter;
0019: prefix = _prefix;
0020: }
0021:
0022: string illustration(string|Image.Image img, mapping extra,
void|string suffix) {
0023: string fn = prefix + "." + (img_counter++) + (suffix||".png");
0024: if(!stringp(img)) img = Image.PNG.encode(img);
0025: Stdio.write_file(fn, img);
0026: werror("Wrote %s from execute.\n", fn);
0027: return "<image>"+fn+"</image>";
0028: }
0029:
0030: string illustration_jpeg(Image.Image img, mapping extra) {
0031: return illustration(Image.JPEG.encode(img, extra), extra,
".jpeg");
0032: }
0033:
0034: string mktag(string name, void|mapping args, void|string c) {
0035: if(!args) args = ([]);
0036: if(!c)
0037: return sprintf("<%s%{ %s='%s'%} />", name, (array)args);
0038: return sprintf("<%s%{ %s='%s'%}>%s</%s>", name, (array)args, c,
name);
0039: }
0040:
0041: array(string) tag_stack = ({});
0042:
0043: string begin_tag(string name, void|mapping args) {
0044: if(!args) args = ([]);
0045: tag_stack += ({ name });
0046: return sprintf("<%s%{ %s='%s'%}>", name, (array)args);
0047: }
0048:
0049: string end_tag() {
0050: if(!sizeof(tag_stack)) throw( ({ "Tag stack underflow.\n",
backtrace() }) );
0051: string name = tag_stack[-1];
0052: tag_stack = tag_stack[..sizeof(tag_stack)-2];
0053: return "</" + name + ">";
0054: }
0055:
0056: string fix_image_path(string name) {
0057: return "/home/mast/Pike/devel/refdoc/src_images/" + name;
0058: }
0059:
0060:
0061:
0062: import Image;
0063:
0064: array modifiers=({"neon","light","dark","bright","dull"});
0065:
0066: object F=Font();
0067:
0068: mixed color_info(array(object) ac)
0069: {
0070:
0071: #define YZ 14
0072: #define YZz (YZ+1)
0073: #define MODX 32
0074: #define CXZ 64
0075: #define CSP 8
0076: #define MSP 4
0077: #define LSP 4
0078: #define XTEXT 100
0079: #define XSP 4
0080: #define cPOS (XTEXT+XSP)
0081: #define tPOS 0
0082: #define txPOS(t) (XSP*2)
0083: #define XZ (CXZ+CSP+(MSP+MODX)*sizeof(modifiers)-MSP)
0084:
0085: object i=Image(XZ+XTEXT,YZz*sizeof(ac),Color.black);
0086: object a=Image(XZ+XTEXT,YZz*sizeof(ac),Color.black);
0087:
0088: int y=0;
0089: foreach (ac,object c)
0090: {
0091: i->box(cPOS+0, y, cPOS+CXZ-1,y+YZ-1,c);
0092: i->box(cPOS+CXZ,y+YZ-LSP,cPOS+XZ, y+YZ-1,c);
0093: a->box(cPOS+0, y, cPOS+CXZ-1,y+YZ-1,Color.white);
0094: a->box(cPOS+CXZ,y+YZ-LSP,cPOS+XZ, y+YZ-1,Color.white);
0095:
0096: int x=CXZ+CSP+cPOS;
0097: foreach (modifiers,string mod)
0098: {
0099: i->box(x,y,x+MODX-1,y+YZ-LSP-1,c[mod]());
0100: a->box(x,y,x+MODX-1,y+YZ-LSP-1,Color.white);
0101: x+=MSP+MODX;
0102: }
0103: i->box(tPOS,y,tPOS+XTEXT-XSP-1,y+YZ-1,
0104: c->neon()->dark()->dark()->dark());
0105: a->box(tPOS,y,tPOS+XTEXT-XSP-1,y+YZ-1,Color.white);
0106: i->paste_alpha_color(F->write(c->name()), Color.white,
0107: txPOS(c->name()),y+1);
0108: y+=YZz;
0109: }
0110:
0111: write(illustration(i,(["alpha":a])));
0112: write(mktag("br")+"\n");
0113: }
0114:
0115: void main()
0116: {
0117: array cs=values(Color);
0118:
0119: array orig=({Color.black,Color.red,Color.green,Color.yellow,
0120: Color.blue,Color.violet,Color.cyan,Color.white});
0121: cs-=orig;
0122: cs-=({Color.pikegreen,Color.avantgardepikegreen,Color.roxenorange,
0123: Color.pikeblue}); // Lame sort of easter egg.
0124:
0125: array grey=Array.filter(cs,lambda(object c) { return c->s==0; });
0126: array colored=cs-grey;
0127:
0128: sort(grey->v,grey);
0129: sort(Array.map(colored,lambda(object c)
0130: {
0131: return (c->h*50-c->s)*10+c->v;
0132: }),colored);
0133:
0134: Array.map(({orig}),color_info);
0135: // write("\240");
0136: Array.map(({grey}),color_info);
0137: // write("\240");
0138: Array.map(colored/8.0,color_info);
0139: }
0140:
0141:
******
Compilation failed.
/home/mast/Pike/devel/build/linux-2.4.14-i686/master.pike:224:
master()->compile_string("\n class Interceptor {\n string buffer =
\"\";\n\n void `()(str
ing in) {\n buffer += in;\n }\n\n string get() {\n
return buffer;\n }\n }\n\
n Interceptor write = Interceptor();\n\n
in"+[3470],0,0)
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:917:
```
__lambda_65603_27_line_906(/home/mast/Pike/devel/build/linux-2.4.14-i686/lib/modules/Parser.pmod
/_parser.so.HTML(),([]),"\n\nimport Image;\n\narray
modifiers=({\"neon\",\"light\","+[2045],"fil
```
e='/home/mast/Pike/devel/refdoc/../src/modules/"+[32])
/home/mast/Pike/devel/build/linux-2.4.14-i686/lib/modules/Parser.pmod/_parser.so.HTML:
finish("\nThis table lists all the different named colors available in
Image.Color.\nThe first c
olumn shows the actual color while the five following
columns\ndemonstrates the modifiers neon,
light, dark,
br"+[2314])
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:245:
fixdesc("\nThis table lists all the different named colors available in
Image.Color.\nThe first
column shows the actual
co"+[2399],"","file='/home/mast/Pike/devel/refdoc/../src/modules/Image/c
olors.c'
first-line='89'")
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:595:
document("appendix",mapping[2],"Image.Color
colors","",/home/mast/Pike/devel/refdoc/bin/mirardoc
.pike.__class_65603_24_line_778())
/home/mast/Pike/devel/refdoc/bin/mirardoc.pike:794:
make_doc_files("../../../images")
/home/mast/Pike/devel/refdoc/bin/extract.pike:54:
```
main(3,({"/home/mast/Pike/devel/refdoc/../src/modules/Image/colors.c","../../../images"}))Pike 7.4https://git.lysator.liu.se/pikelang/pike/-/issues/640do_exit nameclash with PHP42009-04-16T14:11:39ZPeter Bortasdo_exit nameclash with PHP4Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=640
Reported by David Hedbor, Idonex / Real Networks <david@hedbor.org>
Both PHP4 and Pike has a function called do_exit. They do different things
(TM). The result of thi...Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=640
Reported by David Hedbor, Idonex / Real Networks <david@hedbor.org>
Both PHP4 and Pike has a function called do_exit. They do different things
(TM). The result of this name clash is that Pike exits if die/exit is used
in a PHP4 script.
I have attached two patches (for 7.0 and 7.1) which replaces do_exit with
pike_do_exit. A similar report has been sent to the PHP4 people.Pike 7.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbström