pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2020-03-15T11:16:09Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/10018Typechecking errors with large integers and sprintf("%c").2020-03-15T11:16:09ZHenrik (Grubba) GrubbströmTypechecking errors with large integers and sprintf("%c").The testsuite currently fails with:
```
Doing tests in testsuite (12091 tests, pid 29825)
Fri Mar 13 16:28:53 2020: Thread.Thread(0x7fced9367700) at 900
testsuite:2: Soft cast of string(1: -1412597613) to string(2147483647) isn't a valid...The testsuite currently fails with:
```
Doing tests in testsuite (12091 tests, pid 29825)
Fri Mar 13 16:28:53 2020: Thread.Thread(0x7fced9367700) at 900
testsuite:2: Soft cast of string(1: -1412597613) to string(2147483647) isn't a valid cast.
testsuite:2: Expected: string(2147483647).
testsuite:2: Got : string(1: -1412597613).
/lhome/build/Xenofarm/client/pike-devel/medaka.roxen.com/buildtmp/Pike-v8.1-snapshot/src/testsuite.in:14918: Test 11817 (CRNL) failed.
1: mixed a() { return "\25363274223"; }
2: mixed b() { return sprintf("%c", 0x1abcd7893) ; }
testsuite:2: Soft cast of string(1: 1412597613) to string(-2147483648) isn't a valid cast.
testsuite:2: Expected: string(-2147483648).
testsuite:2: Got : string(1: 1412597613).
/lhome/build/Xenofarm/client/pike-devel/medaka.roxen.com/buildtmp/Pike-v8.1-snapshot/src/testsuite.in:14919: Test 11818 (shift 1) (CRNL) failed.
1: mixed a() { return "\12414503555"; }
2: mixed b() { return sprintf("%c", -0x1abcd7893) ; }
Subresult: 41609 tests, 2 failed, 13 skipped
```
The cause is that the values `025363274223`, `0x1abcd7893`, `012414503555` and `-0x1abcd7893` all are out of the 32-bit signed range of the integer type.
The easiest fix is probably just to switch the type for large integers to the generic `int` type.Pike NextHenrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/10017Compiler: The multi assign treeopt fix was broken.2020-03-12T15:28:53ZHenrik (Grubba) GrubbströmCompiler: The multi assign treeopt fix was broken.The fix for #10006 causes warnings in Nettle:
```
Pike v8.1 release 13 running Hilfe v3.5 (Incremental Pike Frontend)
> Nettle.Hash;
/home/grubba/src/Pike/8.1/lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1280: Warning: An expression...The fix for #10006 causes warnings in Nettle:
```
Pike v8.1 release 13 running Hilfe v3.5 (Incremental Pike Frontend)
> Nettle.Hash;
/home/grubba/src/Pike/8.1/lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1280: Warning: An expression of type array(int | string) cannot be assigned to a variable of type array(int | string(8bit)).
/home/grubba/src/Pike/8.1/lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1281: Warning: Expected: array(int | string(8bit)).
/home/grubba/src/Pike/8.1/lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1281: Warning: Got : array(int | string).
```
The code that is warned about:
```
if (!catch([r, salt, iters] = [array(string(8bit)|int)]
array_sscanf(line, format))
```Pike NextHenrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/10016Stdio.Buffer.RewindKey has LFUNs that are declared private.2020-03-09T18:56:40ZHenrik (Grubba) GrubbströmStdio.Buffer.RewindKey has LFUNs that are declared private.Having `create()` and `_destruct()` being private is not a good idea. Change them to protected.Having `create()` and `_destruct()` being private is not a good idea. Change them to protected.Pike 8.0Henrik (Grubba) GrubbströmHenrik (Grubba) Grubbströmhttps://git.lysator.liu.se/pikelang/pike/-/issues/10005The fdlib changes in Pike 8.0.606 broke support for sprshd on NT.2023-01-01T13:02:07ZHenrik (Grubba) GrubbströmThe fdlib changes in Pike 8.0.606 broke support for sprshd on NT.`sprshd` works as usual with Pike 8.0.604.
In Pike 8.0.606 and later it hangs when spawning the first external binary.`sprshd` works as usual with Pike 8.0.604.
In Pike 8.0.606 and later it hangs when spawning the first external binary.Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10001The type for predef::`&() is wrong is some cases.2022-10-06T12:34:15ZHenrik (Grubba) GrubbströmThe type for predef::`&() is wrong is some cases.typeof(17 & 18) gives int(17)|int(18) instead of int(16).typeof(17 & 18) gives int(17)|int(18) instead of int(16).Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/8235Former QA task of PIKE-234 (#8234). See it for details.2020-03-04T16:03:46ZPeter BortasFormer QA task of PIKE-234 (#8234). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-235
Reported by Jonas Walldén <jonasw@roxen.com>
Blocking [PIKE-234](#8234)Imported from https://youtrack.roxen.com/issue/PIKE-235
Reported by Jonas Walldén <jonasw@roxen.com>
Blocking [PIKE-234](#8234)https://git.lysator.liu.se/pikelang/pike/-/issues/8242Former Fix in Pike 8.0 task of PIKE-234 (#8234). See it for details.2019-12-16T09:05:03ZPeter BortasFormer Fix in Pike 8.0 task of PIKE-234 (#8234). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-242
Reported by Eduardo Rodes Pastor <erodes@roxen.com>
Blocking [PIKE-234](#8234)Imported from https://youtrack.roxen.com/issue/PIKE-242
Reported by Eduardo Rodes Pastor <erodes@roxen.com>
Blocking [PIKE-234](#8234)https://git.lysator.liu.se/pikelang/pike/-/issues/8234Make Pike compatible with chunked transfer encoding2020-03-05T18:08:59ZPeter BortasMake Pike compatible with chunked transfer encodingImported from https://youtrack.roxen.com/issue/PIKE-234
Reported by Eduardo Rodes Pastor <erodes@roxen.com>
At the moment, Pike does not allow chunked encoding. The current workaround is adding this line to `HTTP.Protocols.Server.Reque...Imported from https://youtrack.roxen.com/issue/PIKE-234
Reported by Eduardo Rodes Pastor <erodes@roxen.com>
At the moment, Pike does not allow chunked encoding. The current workaround is adding this line to `HTTP.Protocols.Server.Request.pike:568`:
`radd("Transfer-Encoding: ", m->transfer_encoding);`
This must be approved (or changed) and pushed to the Pike source code, since the new IDS proxy version does not work without it.https://git.lysator.liu.se/pikelang/pike/-/issues/8233Pike: Update lib/modules/Search.pmod/Utils.pmod2019-12-10T13:45:31ZPeter BortasPike: Update lib/modules/Search.pmod/Utils.pmodImported from https://youtrack.roxen.com/issue/PIKE-233
Reported by KG Sterneberg <kg@roxen.com>
Replace the 20 empty spaces with 31 empty spaces in the following code:
```
werror(sprintf("%sSearch: %s: %s\n",
" ...Imported from https://youtrack.roxen.com/issue/PIKE-233
Reported by KG Sterneberg <kg@roxen.com>
Replace the 20 empty spaces with 31 empty spaces in the following code:
```
werror(sprintf("%sSearch: %s: %s\n",
" : ",
```https://git.lysator.liu.se/pikelang/pike/-/issues/8241Former QA task of PIKE-229 (#8229). See it for details.2019-12-11T14:05:43ZPeter BortasFormer QA task of PIKE-229 (#8229). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-241
Reported by KG Sterneberg <kg@roxen.com>
Blocking [PIKE-229](#8229)Imported from https://youtrack.roxen.com/issue/PIKE-241
Reported by KG Sterneberg <kg@roxen.com>
Blocking [PIKE-229](#8229)https://git.lysator.liu.se/pikelang/pike/-/issues/8232Former Port fix to Pike task of PIKE-229 (#8229). See it for details.2019-12-09T10:01:41ZPeter BortasFormer Port fix to Pike task of PIKE-229 (#8229). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-232
Reported by KG Sterneberg <kg@roxen.com>
Blocking [PIKE-229](#8229)Imported from https://youtrack.roxen.com/issue/PIKE-232
Reported by KG Sterneberg <kg@roxen.com>
Blocking [PIKE-229](#8229)https://git.lysator.liu.se/pikelang/pike/-/issues/8229Sync fixes from REP.SqlTools.SqlTable to Pike's SqlTable.pike (and then remov...2020-03-05T18:08:44ZPeter BortasSync fixes from REP.SqlTools.SqlTable to Pike's SqlTable.pike (and then remove REP.SqlTools.SqlTable)Imported from https://youtrack.roxen.com/issue/PIKE-229
Reported by KG Sterneberg <kg@roxen.com>Imported from https://youtrack.roxen.com/issue/PIKE-229
Reported by KG Sterneberg <kg@roxen.com>https://git.lysator.liu.se/pikelang/pike/-/issues/8228Former Fix task of PIKE-227 (#8227). See it for details.2019-11-15T15:14:02ZPeter BortasFormer Fix task of PIKE-227 (#8227). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-228
Reported by @grubba
Blocking [PIKE-227](#8227)Imported from https://youtrack.roxen.com/issue/PIKE-228
Reported by @grubba
Blocking [PIKE-227](#8227)https://git.lysator.liu.se/pikelang/pike/-/issues/8227DO_PIKE_CLEANUP frees ADT.List nodes that are still in use at exit.2020-03-05T18:05:47ZPeter BortasDO_PIKE_CLEANUP frees ADT.List nodes that are still in use at exit.Imported from https://youtrack.roxen.com/issue/PIKE-227
Reported by @grubba
`free_all_pike_list_node_blocks()` is called before `do_gc(1)`. This causes stale pointers to be followed be the gc, causing various failures.Imported from https://youtrack.roxen.com/issue/PIKE-227
Reported by @grubba
`free_all_pike_list_node_blocks()` is called before `do_gc(1)`. This causes stale pointers to be followed be the gc, causing various failures.https://git.lysator.liu.se/pikelang/pike/-/issues/8226Consistency check in count_memory() is broken.2019-11-18T15:25:31ZPeter BortasConsistency check in count_memory() is broken.Imported from https://youtrack.roxen.com/issue/PIKE-226
Reported by @grubba
```
Doing tests in testsuite (12090 tests, pid 28821)
Testing scoped variables 17:16...
Assertion failed: !(m->flags & MC_FLAG_INTERNAL), file gc.c, line 5901,...Imported from https://youtrack.roxen.com/issue/PIKE-226
Reported by @grubba
```
Doing tests in testsuite (12090 tests, pid 28821)
Testing scoped variables 17:16...
Assertion failed: !(m->flags & MC_FLAG_INTERNAL), file gc.c, line 5901, function f_count_memory
No result from subprocess (died of signal SIGABRT)
Subresult: 1 tests, 1 failed, 0 skipped
```
The test that causes the assertion failure seems to be
```
test_any([[
/* don't save parent */
class X (void|object a) {};
X o = X (X (X()));
o->a->a->a = o->a;
return count_memory_stats (2, o);
]], [["i:3,c:2,e:0,v:7,r:4,rnd:2"]])
```https://git.lysator.liu.se/pikelang/pike/-/issues/8225Former Fix task of PIKE-224 (#8224). See it for details.2020-01-13T14:35:25ZPeter BortasFormer Fix task of PIKE-224 (#8224). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-225
Reported by @grubba
Blocking [PIKE-224](#8224)Imported from https://youtrack.roxen.com/issue/PIKE-225
Reported by @grubba
Blocking [PIKE-224](#8224)https://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/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/8222Former Fix task of PIKE-221 (#8221). See it for details.2019-10-18T09:16:19ZPeter BortasFormer Fix task of PIKE-221 (#8221). See it for details.Imported from https://youtrack.roxen.com/issue/PIKE-222
Reported by @grubba
Blocking [PIKE-221](#8221)Imported from https://youtrack.roxen.com/issue/PIKE-222
Reported by @grubba
Blocking [PIKE-221](#8221)https://git.lysator.liu.se/pikelang/pike/-/issues/8221las.c:get_name_of_function() on a constant function in a destructed placehold...2020-03-05T18:04:12ZPeter Bortaslas.c:get_name_of_function() on a constant function in a destructed placeholder object dereferences NULL.Imported from https://youtrack.roxen.com/issue/PIKE-221
Reported by @grubba
This crashes the compiler.
Observed in Pike 8.0.Imported from https://youtrack.roxen.com/issue/PIKE-221
Reported by @grubba
This crashes the compiler.
Observed in Pike 8.0.