pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2022-11-06T09:23:56Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/8031Web.SocketIO fails with fatal "Internal error: Not allowed to add more identi...2022-11-06T09:23:56ZPeter BortasWeb.SocketIO fails with fatal "Internal error: Not allowed to add more identifiers during second compiler pass."Imported from https://youtrack.roxen.com/issue/PIKE-31
Reported by @grubba
Blocking [PIKE-20](#8020), now #8020
````
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/program.c:6791:...Imported from https://youtrack.roxen.com/issue/PIKE-31
Reported by @grubba
Blocking [PIKE-20](#8020), now #8020
````
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/program.c:6791: Fatal error:
Internal error: Not allowed to add more identifiers during second compiler pass.
Added identifier: "register"
Backtrace at time of fatal:
-:1: PikeCompiler("", UNDEFINED, -1, -1, target, placeholder)->compile()
-:1: DefaultCompilerEnvironment->compile(PikeCompiler("", UNDEFINED, -1, -1, target, placeholder))
test-install/pike/8.1.11/lib/master.pike:670: compile_string("/*\n\40*\40Clean-room\40Socket.IO\40implementation\40for\40Pike.\n\40*/\n\n//!\40This\40is\40a"+[22574]+"\40\40\40return\40res;\n\40\40}\n}\n","/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/P"+[90]+"eb.pmod/SocketIO.pmod",0,,,2)
test-install/pike/8.1.11/lib/master.pike:1476: master()->low_findprog("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod/SocketIO.pmod","",0,1)
test-install/pike/8.1.11/lib/master.pike:1603: master()->findprog("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod/SocketIO.pmod",".pmod",0,1)
test-install/pike/8.1.11/lib/master.pike:1639: master()->low_cast_to_program("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod/SocketIO",0,0,1)
test-install/pike/8.1.11/lib/master.pike:1917: master()->low_cast_to_object("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod/SocketIO.pmod",0,0)
test-install/pike/8.1.11/lib/master.pike:2145: Web->low_ind("SocketIO",UNDEFINED)
test-install/pike/8.1.11/lib/master.pike:2223: Web->ind("SocketIO")
test-install/pike/8.1.11/lib/master.pike:2259: Web->`[]("SocketIO")
test-install/pike/8.1.11/lib/master.pike:2443: Web->ind("SocketIO")
test-install/pike/8.1.11/lib/master.pike:2498: Web->`[]("SocketIO")
test-install/pike/8.1.11/lib/master.pike:3139: master()->resolv("Web.SocketIO",UNDEFINED,UNDEFINED)
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/test_resolve.pike:45: /main()->test_resolv("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod/SocketIO.pmod",158,UNDEFINED)
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/test_resolve.pike:134: /main()->test_dir("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules/Web.pmod",158,UNDEFINED)
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/test_resolve.pike:92: /main()->test_dir("/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/build/linux-4.11.0-2-amd64-x86_64/test-install/pike/8.1.11/lib/modules",158,UNDEFINED)
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/test_resolve.pike:158: /main()->main()
No result from subprocess (died of signal SIGABRT)
````Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/8030Strange number of references to a mapping.2022-08-29T17:40:51ZPeter BortasStrange number of references to a mapping.Imported from https://youtrack.roxen.com/issue/PIKE-30
Reported by @grubba
Blocking [PIKE-20](#8020)
````
Doing tests in testsuite (11914 tests, pid 12730)
**Block: 0xd0f0ded0c0 Type: mapping Refs: -253832321
*******************
/ho...Imported from https://youtrack.roxen.com/issue/PIKE-30
Reported by @grubba
Blocking [PIKE-20](#8020)
````
Doing tests in testsuite (11914 tests, pid 12730)
**Block: 0xd0f0ded0c0 Type: mapping Refs: -253832321
*******************
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/mapping.c:67: Fatal error:
really free mapping on mapping with -253832321 refs.
No stack - no backtrace.
Aborted (core dumped)
Testing vtables and scope access: 8:19264
/home/hungerf3/xeno/xenoclient/[pike-8](#8008).1/cruncher.ofdoom.com/buildtmp/Pike-v8.1-snapshot/src/testsuite.in:5643: Test 1000 (shift 1) (CRNL) failed.
1: mixed a() {
2: Stdio.write_file ("testsuite_test.pike", #"\
3: int main()
4: {
5: Thread.Mutex m = Thread.Mutex();
6: Thread.MutexKey l = m->lock();
7: Thread.thread_create (lambda () {m->lock(); exit (0);});
8: call_out (destruct, 0, l);
9: return -1;
10: }");
11: return Process.system (RUNPIKE +" testsuite_test.pike");
12: ; }
13: mixed b() { return 0; }
o->a(): 134
o->b(): 0
````https://git.lysator.liu.se/pikelang/pike/-/issues/8028The preprocessor leaks macro names on failed expansion.2022-08-29T17:40:51ZPeter BortasThe preprocessor leaks macro names on failed expansion.Imported from https://youtrack.roxen.com/issue/PIKE-28
Reported by @grubba
Blocking [PIKE-20](#8020)
The name of the macro being expanded could leak if there was an error in its list of parameters.Imported from https://youtrack.roxen.com/issue/PIKE-28
Reported by @grubba
Blocking [PIKE-20](#8020)
The name of the macro being expanded could leak if there was an error in its list of parameters.https://git.lysator.liu.se/pikelang/pike/-/issues/8027Fix issue where strings intermittently get corrupted by the Image module.2022-08-29T17:40:51ZPeter BortasFix issue where strings intermittently get corrupted by the Image module.Imported from https://youtrack.roxen.com/issue/PIKE-27
Reported by @grubba
Blocking [PIKE-20](#8020)
If a dynamically allocated string (eg "Random.Deterministic") that had
an active substring (eg "Deterministic") later got replaced wi...Imported from https://youtrack.roxen.com/issue/PIKE-27
Reported by @grubba
Blocking [PIKE-20](#8020)
If a dynamically allocated string (eg "Random.Deterministic") that had
an active substring (eg "Deterministic") later got replaced with a
statically allocated string, the substring would point to freed memory.
Fixes intermittent failures to resolve "Random.Deterministic" in from
Image.Image()->test(), as well as the fatal "Shared string is not zero
terminated properly." from eg _verify_internals().https://git.lysator.liu.se/pikelang/pike/-/issues/8026Fix fatal "Didn't find gc marker as expected" for types.2022-08-29T17:40:51ZPeter BortasFix fatal "Didn't find gc marker as expected" for types.Imported from https://youtrack.roxen.com/issue/PIKE-26
Reported by @grubba
Blocking [PIKE-20](#8020)
All types didn't have markers at cleanup time.Imported from https://youtrack.roxen.com/issue/PIKE-26
Reported by @grubba
Blocking [PIKE-20](#8020)
All types didn't have markers at cleanup time.https://git.lysator.liu.se/pikelang/pike/-/issues/8025_Roxen.HeaderParser leaks mappings in feed().2022-08-29T17:40:51ZPeter Bortas_Roxen.HeaderParser leaks mappings in feed().Imported from https://youtrack.roxen.com/issue/PIKE-25
Reported by @grubba
Blocking [PIKE-20](#8020)
The mapping intended to hold the parsed headers from feed()
leaked if the HTTP headers were malformed.Imported from https://youtrack.roxen.com/issue/PIKE-25
Reported by @grubba
Blocking [PIKE-20](#8020)
The mapping intended to hold the parsed headers from feed()
leaked if the HTTP headers were malformed.https://git.lysator.liu.se/pikelang/pike/-/issues/8024Fix NULL dereference by count_memory() when running --with-dmalloc.2022-08-29T17:40:51ZPeter BortasFix NULL dereference by count_memory() when running --with-dmalloc.Imported from https://youtrack.roxen.com/issue/PIKE-24
Reported by @grubba
Blocking [PIKE-20](#8020)
Don't attempt to get gc markers when the gc isn't active.Imported from https://youtrack.roxen.com/issue/PIKE-24
Reported by @grubba
Blocking [PIKE-20](#8020)
Don't attempt to get gc markers when the gc isn't active.https://git.lysator.liu.se/pikelang/pike/-/issues/8023The compiler crashes when compiling some files.2022-08-29T17:40:51ZPeter BortasThe compiler crashes when compiling some files.Imported from https://youtrack.roxen.com/issue/PIKE-23
Reported by @grubba
Blocking [PIKE-20](#8020)
Recovers from issue where the compiler context could come out of
sync due to syntax errors in nested classes. This could in turn
lead...Imported from https://youtrack.roxen.com/issue/PIKE-23
Reported by @grubba
Blocking [PIKE-20](#8020)
Recovers from issue where the compiler context could come out of
sync due to syntax errors in nested classes. This could in turn
lead to various obscure errors, some of which were fatal.https://git.lysator.liu.se/pikelang/pike/-/issues/8022The compiler leaks types.2022-08-29T17:40:51ZPeter BortasThe compiler leaks types.Imported from https://youtrack.roxen.com/issue/PIKE-22
Reported by @grubba
Blocking [PIKE-20](#8020)
The resulting type from resolving the auto return type
leaked when there was more than one return statement.Imported from https://youtrack.roxen.com/issue/PIKE-22
Reported by @grubba
Blocking [PIKE-20](#8020)
The resulting type from resolving the auto return type
leaked when there was more than one return statement.https://git.lysator.liu.se/pikelang/pike/-/issues/8021random_string() loses references to the empty string.2022-08-29T17:40:51ZPeter Bortasrandom_string() loses references to the empty string.Imported from https://youtrack.roxen.com/issue/PIKE-21
Reported by @grubba
Blocking [PIKE-20](#8020)
Calling random_string() with 0 caused the empty string
to lose a reference.Imported from https://youtrack.roxen.com/issue/PIKE-21
Reported by @grubba
Blocking [PIKE-20](#8020)
Calling random_string() with 0 caused the empty string
to lose a reference.https://git.lysator.liu.se/pikelang/pike/-/issues/8018Cannot wait for conditions when threads are disabled2020-07-24T10:52:52ZPeter BortasCannot wait for conditions when threads are disabledImported from https://youtrack.roxen.com/issue/PIKE-18
Reported by Marcus Wellhardh <wellhard@roxen.com>
After a thread dump the following error is repeated all over until the server restarted by the ABS:
````
11:13:53 : Int...Imported from https://youtrack.roxen.com/issue/PIKE-18
Reported by Marcus Wellhardh <wellhard@roxen.com>
After a thread dump the following error is repeated all over until the server restarted by the ABS:
````
11:13:53 : Internal server error: Cannot wait for conditions when threads are disabled!
-:1: Thread.Queue(0)->wait(_static_modules.Builtin()->mutex_key())
pike/lib/modules/Thread.pmod:275: Thread.Queue(0)->read()
base_server/roxen.pike (cf814f9c):715: roxen()->handler_thread(4)
```
See attachment for more info.
The entire log is in /home/wellhard/Kunder/Shaw/default.2.bz2
#### Attachments:
- [dump.txt](/uploads/b3aecbad5761f3f1b325481da2c98a8b/dump.txt "dump.txt")https://git.lysator.liu.se/pikelang/pike/-/issues/8017Provide debug hooks to track the file system monitor state.2017-07-19T10:34:59ZPeter BortasProvide debug hooks to track the file system monitor state.Imported from https://youtrack.roxen.com/issue/PIKE-17
Reported by @grubba
Tracing of the file system monitor system is currently provided via the -DFILESYSTEM_MONITOR_DEBUG option, which simply tracks all operations. This is useful, b...Imported from https://youtrack.roxen.com/issue/PIKE-17
Reported by @grubba
Tracing of the file system monitor system is currently provided via the -DFILESYSTEM_MONITOR_DEBUG option, which simply tracks all operations. This is useful, but is hard to use as interesting information has a tendency to drown in other data.
Add an API to make it possible to get more fine-grained filtering of the trace.https://git.lysator.liu.se/pikelang/pike/-/issues/8015Filesystem.Monitor: Poll accelerated monitors too.2022-08-30T14:04:03ZPeter BortasFilesystem.Monitor: Poll accelerated monitors too.Imported from https://youtrack.roxen.com/issue/PIKE-15
Reported by @grubba
Related to [PIKE-19](#8019),now #8019
Both the Inotify and FSEvents APIs claim that they support
notifications on eg network file system...Imported from https://youtrack.roxen.com/issue/PIKE-15
Reported by @grubba
Related to [PIKE-19](#8019),now #8019
Both the Inotify and FSEvents APIs claim that they support
notifications on eg network file systems, and while they will
succeed in notifying on changes performed by the local host
on such file systems, they will not on changes performed by
other hosts. To avoid missing such changes such monitors
need to be scanned too.https://git.lysator.liu.se/pikelang/pike/-/issues/8014Parser.HTML leaks stack.2017-06-14T12:57:46ZPeter BortasParser.HTML leaks stack.Imported from https://youtrack.roxen.com/issue/PIKE-14
Reported by @grubba
When a parser tag or container callback returns zero, there are some cases where the zero doesn't get popped from the stack.
This can cause the parser to run o...Imported from https://youtrack.roxen.com/issue/PIKE-14
Reported by @grubba
When a parser tag or container callback returns zero, there are some cases where the zero doesn't get popped from the stack.
This can cause the parser to run out of stack for large documents.https://git.lysator.liu.se/pikelang/pike/-/issues/8013ADT.Trie dumps massive state in backtraces2020-03-08T13:58:29ZPeter BortasADT.Trie dumps massive state in backtracesImported from https://youtrack.roxen.com/issue/PIKE-13
Reported by Jonas Walldén <jonasw@roxen.com>
See attached example of 2000+ lines of noise. This needs to be shortened or removed.
#### Attachments:
- [adt.trie.txt](/uploads/4137...Imported from https://youtrack.roxen.com/issue/PIKE-13
Reported by Jonas Walldén <jonasw@roxen.com>
See attached example of 2000+ lines of noise. This needs to be shortened or removed.
#### Attachments:
- [adt.trie.txt](/uploads/4137fd782ac5a2d27f470ed453f84fe9/adt.trie.txt "adt.trie.txt")https://git.lysator.liu.se/pikelang/pike/-/issues/8012Unlocking of mutexes that are waited on should force thread yielding.2017-04-26T13:30:08ZPeter BortasUnlocking of mutexes that are waited on should force thread yielding.Imported from https://youtrack.roxen.com/issue/PIKE-12
Reported by @grubba
Currently when a mutex is unlocked, the underlying condvar is signaled, but no thread yield is forced. This means that the current thread may relock the mutex w...Imported from https://youtrack.roxen.com/issue/PIKE-12
Reported by @grubba
Currently when a mutex is unlocked, the underlying condvar is signaled, but no thread yield is forced. This means that the current thread may relock the mutex without the waiting thread getting to run, leading to starvation of the waiting thread.https://git.lysator.liu.se/pikelang/pike/-/issues/8010Pike.identify_cycle doesn't handle declared-only __hash member2023-11-05T10:13:18ZPeter BortasPike.identify_cycle doesn't handle declared-only __hash memberImported from https://youtrack.roxen.com/issue/PIKE-10
Reported by Martin Karlgren <marty@roxen.com>
Pike.identify_cycle throws when a class has a declared, but not defined, __hash member. (Not sure if the problem really is in hash_sva...Imported from https://youtrack.roxen.com/issue/PIKE-10
Reported by Martin Karlgren <marty@roxen.com>
Pike.identify_cycle throws when a class has a declared, but not defined, __hash member. (Not sure if the problem really is in hash_svalue?)
```
> class Foo { mixed bar; int __hash(); }
> class Bar { mixed foo; }
> Foo foo = Foo();
> Bar bar = Bar();
> foo->bar = bar;
(1) Result: HilfeInput()->Bar()
> bar->foo = foo;
(2) Result: HilfeInput()->Foo()
> Pike.identify_cycle(foo);
Calling undefined function.
HilfeInput:1: HilfeInput()->Foo()->__hash()
-:1: __builtin.identify_cycle(HilfeInput()->Foo())
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/8008bool resolves to int(1..1)2017-04-27T13:39:11ZPeter Bortasbool resolves to int(1..1)Imported from https://youtrack.roxen.com/issue/PIKE-8
Reported by KG Sterneberg <kg@roxen.com>
I get the following problem:
```
>pike bool-test.pike
int(1..1)
Bool value: 1
Bad argument 1 to foo(). Expected object | { bool = int(1..1)...Imported from https://youtrack.roxen.com/issue/PIKE-8
Reported by KG Sterneberg <kg@roxen.com>
I get the following problem:
```
>pike bool-test.pike
int(1..1)
Bool value: 1
Bad argument 1 to foo(). Expected object | { bool = int(1..1) }.
bool-test.pike:9: /main()->foo(0)
bool-test.pike:5:
/main()->main(1,({"/Users/kg/dev/learning/pike/bool-test.pike"}))
```
when running:
```
int main(int argc, array(string) argv)
{
werror("%O\n", bool);
foo(true);
foo(false);
return 0;
}
variant void foo(bool v) {
werror("Bool value: %O\n", v);
}
variant void foo(object v) {
werror("Object: %O\n", v);
}
```
Without variant it works fine:
```
int main(int argc, array(string) argv)
{
werror("%O\n", bool);
foo(true);
foo(false);
return 0;
}
void foo(bool v) {
werror("Bool value: %O\n", v);
}
}
```
Possible solution (by Grubba):
In master.pike, replace
```
enum bool { false=0, true=1 };
```
with
```
typedef int(0..1) bool;
enum { false=0, true=1 };
```https://git.lysator.liu.se/pikelang/pike/-/issues/8007The Protocols.HTTP.Query timeout is lost during TLS negotiation when using pr...2017-09-15T14:40:31ZPeter BortasThe Protocols.HTTP.Query timeout is lost during TLS negotiation when using proxies.Imported from https://youtrack.roxen.com/issue/PIKE-7
Reported by @grubba
In the interval between Protocols.HTTP.https_proxy_connect_ok() being called, and do_sync_method() being called on successful TLS connection there is no active t...Imported from https://youtrack.roxen.com/issue/PIKE-7
Reported by @grubba
In the interval between Protocols.HTTP.https_proxy_connect_ok() being called, and do_sync_method() being called on successful TLS connection there is no active timeout. This means that if the TLS server is stopped, the connection will hang indefinitely even if a timeout has been set.https://git.lysator.liu.se/pikelang/pike/-/issues/8006Arg module broken2017-09-15T14:40:31ZPeter BortasArg module brokenImported from https://youtrack.roxen.com/issue/PIKE-6
Reported by Marcus Wellhardh <wellhard@roxen.com>
Installing patch "2017-02-01T151715: Pike 8.0: sizeof on Mysql.SqlTable, JWT & JWK" breaks the Arg module:
```
> apollo:roxen wel...Imported from https://youtrack.roxen.com/issue/PIKE-6
Reported by Marcus Wellhardh <wellhard@roxen.com>
Installing patch "2017-02-01T151715: Pike 8.0: sizeof on Mysql.SqlTable, JWT & JWK" breaks the Arg module:
```
> apollo:roxen wellhard$ ./server-6.0.130/bin/roxen
Pike v8.0 release 232 running Hilfe v3.5 (Incremental Pike Frontend)
> indices(Arg);
server-6.0.130/pike/lib/modules/Arg.pmod:421:Bad argument 1 to unknown function.
server-6.0.130/pike/lib/modules/Arg.pmod:421:Expected: int.
server-6.0.130/pike/lib/modules/Arg.pmod:421:Got : object(implements program(/Users/wellhard/Testarea/roxen-6.0.130-r1-ep-macosx_x86_64/roxen/server-6.0.130/pike/lib/modules/Arg.pmod:397)).
server-6.0.130/pike/lib/modules/Arg.pmod:421:Too many arguments to unknown function (expected 1 arguments).
server-6.0.130/pike/lib/modules/Arg.pmod:421:Got : zero.
server-6.0.130/pike/lib/modules/Arg.pmod:491:Cannot inherit program in pass 2 which is not fully compiled yet.
server-6.0.130/pike/lib/modules/Arg.pmod:491:(You probably have a cyclic symbol dependency that the compiler cannot handle.)
server-6.0.130/pike/lib/modules/Arg.pmod:548:Cannot inherit program in pass 2 which is not fully compiled yet.
server-6.0.130/pike/lib/modules/Arg.pmod:548:(You probably have a cyclic symbol dependency that the compiler cannot handle.)
server-6.0.130/pike/lib/modules/Arg.pmod:637:Placeholder already has storage!
```
The following patch fixes the problem:
```
apollo:roxen wellhard$ diff -u server-6.0.130/pike/lib/modules/Arg.pmod.ORIG server-6.0.130/pike/lib/modules/Arg.pmod
--- server-6.0.130/pike/lib/modules/Arg.pmod.ORIG 2017-02-22 11:38:22.000000000 +0100
+++ server-6.0.130/pike/lib/modules/Arg.pmod 2017-02-22 11:47:47.000000000 +0100
@@ -418,7 +418,13 @@
env = getenv();
// Make a list of all the arguments we can parse.
- foreach(::_indices(this, 0), string index)
+ foreach(
+#if __BUILD__ < 368
+ ::_indices(2)
+#else
+ ::_indices(this, 0)
+#endif
+ , string index)
{
mixed val = ::`[](index, this, 0);
if(objectp(val) && val->is_opt) opts[index]=val;
```