pike issues
https://git.lysator.liu.se/pikelang/pike/-/issues
2020-03-05T18:02:52Z
https://git.lysator.liu.se/pikelang/pike/-/issues/8216
Filter headers sent to proxy when CONNECT.
2020-03-05T18:02:52Z
Peter Bortas
Filter headers sent to proxy when CONNECT.
Imported from https://youtrack.roxen.com/issue/PIKE-216
Reported by @grubba
Imported from https://youtrack.roxen.com/issue/PIKE-216
Reported by @grubba
https://git.lysator.liu.se/pikelang/pike/-/issues/8217
Former QA PIKE-216 task of PIKE-216 (#8216). See it for details.
2019-10-02T13:03:04Z
Peter Bortas
Former QA PIKE-216 task of PIKE-216 (#8216). See it for details.
Imported from https://youtrack.roxen.com/issue/PIKE-217
Reported by @grubba
Imported from https://youtrack.roxen.com/issue/PIKE-217
Reported by @grubba
https://git.lysator.liu.se/pikelang/pike/-/issues/8218
Former Merge PIKE-216 task of PIKE-216 (#8216). See it for details.
2019-10-04T09:56:15Z
Peter Bortas
Former Merge PIKE-216 task of PIKE-216 (#8216). See it for details.
Imported from https://youtrack.roxen.com/issue/PIKE-218
Reported by @grubba
Imported from https://youtrack.roxen.com/issue/PIKE-218
Reported by @grubba
https://git.lysator.liu.se/pikelang/pike/-/issues/8219
Backport Pike.DestructImmediate to Pike 8.0.
2020-03-05T18:03:41Z
Peter Bortas
Backport Pike.DestructImmediate to Pike 8.0.
Imported from https://youtrack.roxen.com/issue/PIKE-219
Reported by @grubba
Imported from https://youtrack.roxen.com/issue/PIKE-219
Reported by @grubba
https://git.lysator.liu.se/pikelang/pike/-/issues/8220
Former QA [Pike-219]. task of PIKE-219 (#8219). See it for details.
2019-10-21T10:16:11Z
Peter Bortas
Former QA [Pike-219]. task of PIKE-219 (#8219). See it for details.
Imported from https://youtrack.roxen.com/issue/PIKE-220
Reported by @grubba
Imported from https://youtrack.roxen.com/issue/PIKE-220
Reported by @grubba
https://git.lysator.liu.se/pikelang/pike/-/issues/8221
las.c:get_name_of_function() on a constant function in a destructed placehold...
2020-03-05T18:04:12Z
Peter Bortas
las.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.
https://git.lysator.liu.se/pikelang/pike/-/issues/8222
Former Fix task of PIKE-221 (#8221). See it for details.
2019-10-18T09:16:19Z
Peter Bortas
Former 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/8223
debug_fatal(fmt="Using %s freed svalue
2019-10-28T14:43:54Z
Peter Bortas
debug_fatal(fmt="Using %s freed svalue
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 ...
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/8224
describe_backtrace() argument shorting sometimes extends the argument.
2020-03-05T18:05:00Z
Peter Bortas
describe_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/8225
Former Fix task of PIKE-224 (#8224). See it for details.
2020-01-13T14:35:25Z
Peter Bortas
Former 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/8226
Consistency check in count_memory() is broken.
2019-11-18T15:25:31Z
Peter Bortas
Consistency 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/8227
DO_PIKE_CLEANUP frees ADT.List nodes that are still in use at exit.
2020-03-05T18:05:47Z
Peter Bortas
DO_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/8228
Former Fix task of PIKE-227 (#8227). See it for details.
2019-11-15T15:14:02Z
Peter Bortas
Former 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/8229
Sync fixes from REP.SqlTools.SqlTable to Pike's SqlTable.pike (and then remov...
2020-03-05T18:08:44Z
Peter Bortas
Sync 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/8232
Former Port fix to Pike task of PIKE-229 (#8229). See it for details.
2019-12-09T10:01:41Z
Peter Bortas
Former 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/8233
Pike: Update lib/modules/Search.pmod/Utils.pmod
2019-12-10T13:45:31Z
Peter Bortas
Pike: Update lib/modules/Search.pmod/Utils.pmod
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",
" ...
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/8234
Make Pike compatible with chunked transfer encoding
2020-03-05T18:08:59Z
Peter Bortas
Make Pike compatible with chunked transfer encoding
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.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/8235
Former QA task of PIKE-234 (#8234). See it for details.
2020-03-04T16:03:46Z
Peter Bortas
Former 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/8238
Former QA C module task of PIKE-89 (#8089). See it for details.
2018-04-12T09:42:06Z
Peter Bortas
Former QA C module task of PIKE-89 (#8089). See it for details.
Imported from https://youtrack.roxen.com/issue/PIKE-238
Reported by Roxen Scrum Team <roxenscrumteam@roxen.com>
Imported from https://youtrack.roxen.com/issue/PIKE-238
Reported by Roxen Scrum Team <roxenscrumteam@roxen.com>
https://git.lysator.liu.se/pikelang/pike/-/issues/8239
Issue with reused HTTPClient.SessionQuery objects
2018-12-06T11:37:21Z
Peter Bortas
Issue with reused HTTPClient.SessionQuery objects
Imported from https://youtrack.roxen.com/issue/PIKE-239
Reported by Martin Karlgren <marty@roxen.com>
Related to [PIKE-148](#8148)
There seems to be issues with reused HTTPClient.SessionQuery objects. I suspect that `source_stream` wa...
Imported from https://youtrack.roxen.com/issue/PIKE-239
Reported by Martin Karlgren <marty@roxen.com>
Related to [PIKE-148](#8148)
There seems to be issues with reused HTTPClient.SessionQuery objects. I suspect that `source_stream` was set in an earlier request and not properly reset.
Also, keep [PIKE-148](#8148) in mind. Perhaps the connection reuse handling should be revamped there.
```
String data not allowed in streaming mode.
6:02:52 1m 8.9s : etc/modules/HTTPClient.pmod:683: HTTPClient.Session()->SessionQuery(201 Created.)->async_request("roxen-appl-community-test-archive.roxen.com",80,"POST /rest/rep.shaw.story/_search HTTP/1.1",mapping[7],,,0)
6:02:52 : pike/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:256: Request("http://roxen-appl-community-test-archive.roxen.com/rest/rep.shaw.story/_search" - connected - 0 bytes received)->do_async(({"roxen-appl-community-test-archive.roxen.com",80,"POST /rest/rep.shaw.story/_search HTTP/1.1",@0=mapping[7],,,0}))
6:02:52 : pike/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:886: HTTPClient.Session()->async_do_method_url("POST",URI("http://roxen-appl-community-test-archive.roxen.com/rest/rep.shaw.story/_search"),UNDEFINED,,,5)
6:02:52 : etc/modules/HTTPClient.pmod:536: HTTPClient.Session()->async_do_method_url("POST",@2=URI("http://roxen-appl-community-test-archive.roxen.com/rest/rep.shaw.story/_search"),UNDEFINED,,,5)
6:02:52 : etc/modules/HTTPClient.pmod:166: HTTPClient.do_safe_method("POST",@6=URI("http://roxen-appl-community-test-archive.roxen.com/rest/rep.shaw.story/_search"),HTTPClient.Arguments(),0,HTTPClient.Session())
6:02:52 1m 8.9s : etc/modules/HTTPClient.pmod:65: HTTPClient.sync_post(@6,@7=HTTPClient.Arguments(),@8=HTTPClient.Session())
```
https://git.lysator.liu.se/pikelang/pike/-/issues/8241
Former QA task of PIKE-229 (#8229). See it for details.
2019-12-11T14:05:43Z
Peter Bortas
Former 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/8242
Former Fix in Pike 8.0 task of PIKE-234 (#8234). See it for details.
2019-12-16T09:05:03Z
Peter Bortas
Former 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/8243
Roxen error, possible search
2018-10-23T08:51:16Z
Peter Bortas
Roxen error, possible search
Imported from https://youtrack.roxen.com/issue/PIKE-243
Reported by jonas.lonnberg <jonas.lonnberg@roxen.com>
Reported in [RT#31253](http://rt.roxen.com/rt3/Ticket/Display.html?id=31253).
A Roxen site not responding to requests. Versi...
Imported from https://youtrack.roxen.com/issue/PIKE-243
Reported by jonas.lonnberg <jonas.lonnberg@roxen.com>
Reported in [RT#31253](http://rt.roxen.com/rt3/Ticket/Display.html?id=31253).
A Roxen site not responding to requests. Version 6.1.200 | rhel6_x86_64.
```
: Search: Notice: Starting database compactor with
Pike v8.0 release 408
: compact: OPTIMIZE TABLE deleted_document
: compact: OPTIMIZE TABLE document
: compact: OPTIMIZE TABLE field
: compact: OPTIMIZE TABLE lastmodified
: compact: OPTIMIZE TABLE link
: compact: OPTIMIZE TABLE metadata
: compact: OPTIMIZE TABLE queue
: compact: OPTIMIZE TABLE uri
: compact: OPTIMIZE TABLE word_hit
word 20724 (1884.4/s) "cashel"
First document id out of range: 0x83010358
Skipping this word.
word 21742 (1902.1/s) "coal"
First document id out of range: 0x9a38b939
Skipping this word.
word 22267 (1903.3/s) "conducted"
First document id out of range: 0x86000013
Skipping this word.
word 23775 (1911.9/s) "delays"
First document id out of range: 0xff3fff00
Skipping this word.
*** glibc detected *** /roxen/roxen/server-6.1.200/bin/roxen:
munmap_chunk(): invalid pointer: 0x000000000229f220 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3da9075dee]
/roxen/roxen/server-6.1.200/pike/lib/modules/_WhiteFish.so(+0x74af)[0x7fb72d7fd4af]
/roxen/roxen/server-6.1.200/bin/roxen[0x42bc81]
/roxen/roxen/server-6.1.200/bin/roxen[0x42c7cd]
[0x7fb72d789aff]
======= Memory map: ========
00400000-00671000 r-xp 00000000 fd:00 288096 /roxen/roxen/server-6.1.200/bin/roxen
00870000-00873000 rw-p 00270000 fd:00 288096 /roxen/roxen/server-6.1.200/bin/roxen
00873000-008d2000 rw-p 00000000 00:00 0
01d40000-02423000 rw-p 00000000 00:00 0 [heap]
3da8c00000-3da8c20000 r-xp 00000000 fd:00 56 /lib64/ld-2.12.so
3da8e20000-3da8e21000 r--p 00020000 fd:00 56 /lib64/ld-2.12.so
3da8e21000-3da8e22000 rw-p 00021000 fd:00 56 /lib64/ld-2.12.so
3da8e22000-3da8e23000 rw-p 00000000 00:00 0
3da9000000-3da918a000 r-xp 00000000 fd:00 78 /lib64/libc-2.12.so
3da918a000-3da938a000 ---p 0018a000 fd:00 78 /lib64/libc-2.12.so
3da938a000-3da938e000 r--p 0018a000 fd:00 78 /lib64/libc-2.12.so
3da938e000-3da9390000 rw-p 0018e000 fd:00 78 /lib64/libc-2.12.so
3da9390000-3da9394000 rw-p 00000000 00:00 0
3da9400000-3da9417000 r-xp 00000000 fd:00 772 /lib64/libpthread-2.12.so
3da9417000-3da9617000 ---p 00017000 fd:00 772 /lib64/libpthread-2.12.so
3da9617000-3da9618000 r--p 00017000 fd:00 772 /lib64/libpthread-2.12.so
3da9618000-3da9619000 rw-p 00018000 fd:00 772 /lib64/libpthread-2.12.so
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10016
Stdio.Buffer.RewindKey has LFUNs that are declared private.
2020-03-09T18:56:40Z
Henrik (Grubba) Grubbström
Stdio.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.0
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10017
Compiler: The multi assign treeopt fix was broken.
2020-03-12T15:28:53Z
Henrik (Grubba) Grubbström
Compiler: 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 Next
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10018
Typechecking errors with large integers and sprintf("%c").
2020-03-15T11:16:09Z
Henrik (Grubba) Grubbström
Typechecking 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 Next
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10027
Standards.JSON5.encode() can stall a multi-threaded process for quite a while
2020-03-31T09:56:10Z
Henrik (Grubba) Grubbström
Standards.JSON5.encode() can stall a multi-threaded process for quite a while
Cf #10026, but replace JSON with JSON5.
Cf #10026, but replace JSON with JSON5.
Pike Next
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10033
Operator assignment and strict_types
2022-11-21T10:00:53Z
Henrik (Grubba) Grubbström
Operator assignment and strict_types
From the Pike developers mailinglist:
```
22509896 2018-03-26 17:36 -0700 /41 lines/ Marc Simpson <marc@0branch.com>
Sender: SRS0+w18L=GR=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Imported: 2018-03-27 02:36 av Brevbäraren
Ex...
From the Pike developers mailinglist:
```
22509896 2018-03-26 17:36 -0700 /41 lines/ Marc Simpson <marc@0branch.com>
Sender: SRS0+w18L=GR=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Imported: 2018-03-27 02:36 av Brevbäraren
External recipient: pike-devel@lists.lysator.liu.se
To: Pike (-) developers forum <20565>
Subject: Operator assignment and strict_types
```
Hi folks,
It looks like operator assignment (op=), increment and decrement
statements aren't subjected to the same typechecks as their more
explicit equivalents.
For example, neither the post-increment nor += statements below warn
with strict_types enabled, even though they assign values outside of
foo's restricted int domain:
int(3..3) foo = 3;
foo++; // no warning
foo += 1; // no warning
foo = foo + 1; // warning from strict_types
Similarly, operator assignment on aggregates fails to elicit a warning:
array(int) a = ({});
multiset(int) b = (<>);
mapping(int:int) c = ([]);
// no warnings
a += ({ "hey" });
b += (< "hey" >);
c += ([ "hey": "there" ]);
// warnings from strict_types
a = a + ({ "hey" });
b = b + (< "hey" >);
c = c + ([ "hey": "there" ]);
I'm guessing this is because the checks provided by the
F_ASSIGN/F_ASSIGN_SELF case (las.c) only apply to direct assignment;
op= and friends are presumably not instrumented for strict_types in
the same manner.
Have there been any discussions around addressing this inconsistency?
Thanks,
Marc
Pike 9.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10035
SQLite query segfaults
2020-05-14T11:08:29Z
Henrik (Grubba) Grubbström
SQLite query segfaults
Form the Pike Developers mailinglist:
23989767 Yesterday 21:13 /42 lines/ Marc Simpson <marc@0branch.com>\
Sender: SRS0+Qc9x=6M=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se\
Imported: Yesterday 21:13 by Brevbäraren\
External r...
Form the Pike Developers mailinglist:
23989767 Yesterday 21:13 /42 lines/ Marc Simpson <marc@0branch.com>\
Sender: SRS0+Qc9x=6M=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se\
Imported: Yesterday 21:13 by Brevbäraren\
External recipient: pike-devel@lists.lysator.liu.se\
To: Pike (-) developers forum <20962>\
Subject: SQLite query segfaults
Hi folks,
It seems that I can reliably segfault recent Pike 8.1 installs when
using sprintf-style SQLite queries:
$ echo '
create table demo(a, b);
insert into demo(a, b) values(1, "abc")' | sqlite3 demo.db
$ pike
Pike v8.1 release 13 running Hilfe v3.5 [...]
> Sql.Sql db = Sql.Sql("sqlite://demo.db");
> db->query("select * from demo");
(1) Result: ({ /* 1 element */
([ /* 2 elements */
"a": "1",
"b": "abc"
])
})
> db->query("select * from demo where a = :a", ([":a": 1 ]));
(2) Result: ({ /* 1 element */
([ /* 2 elements */
"a": "1",
"b": "abc"
])
})
> db->query("select * from demo where a = %d", 1);
Segmentation fault
This occurs on both macOS and Linux; on macOS, segfaults are observed
when the SQLite module is linked against either MacPorts' SQLite 3 or
the system wide dylib in /usr/lib.
Note that query() with a mapping argument doesn't segfault;
furthermore, no such segfault occurs under Pike v8.0 release 702.
Please let me know whether this is reproducible (and/or whether more
information is required).
Thanks,
Marc
(23989767) /Marc Simpson <marc@0branch.com>/--------
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10037
Dumping failure of 7.8::SSL.session
2023-11-05T09:31:19Z
Marcus Comstedt
Dumping failure of 7.8::SSL.session
I noticed this dumping failure in the pikefarm builds of bahamut, but it can be reproduced on any system. Presumably the dump works if 8.0::Crypto has been dumped first, since most pikefarm systems do not hit the issue...
``` shell
hak...
I noticed this dumping failure in the pikefarm builds of bahamut, but it can be reproduced on any system. Presumably the dump works if 8.0::Crypto has been dumped first, since most pikefarm systems do not hit the issue...
``` shell
hakua:~/Pike/8.1/build/linux-5.4.41-ppc64% /home/marcus/Pike/8.1/build/linux-5.4.41-ppc64/pike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m/home/marcus/Pike/8.1/build/linux-5.4.41-ppc64/master.pike -x dump -t /tmp/dumptest ../../lib/7.8/modules/SSL.pmod/session.pike
#### ../../lib/7.8/modules/SSL.pmod/session.pike:
Cannot find 8.0::Crypto.CompatProxy() in 8.0::Crypto.
master.pike:5697:
master()->Encoder()->find_index(8.0::Crypto,8.0::Crypto.CompatProxy(),({0}),UNDEFINED)
master.pike:5924:
master()->Encoder()->nameof(@0=8.0::Crypto.CompatProxy(),@1=({0}))
master.pike:5916:
master()->Encoder()->nameof(8.0::Crypto.CompatProxy()->Buffer,({0}))
master.pike:5965:
master()->Encoder()->nameof(8.0::Crypto.CompatProxy()->Buffer->State,UNDEFINED)
/home/marcus/Pike/8.1/lib/modules/Tools.pmod/Standalone.pmod/dump.pike:221:
Tools.Standalone.dump()->dumpit("../../lib/7.8/modules/SSL.pmod/session.pike","/tmp/dumptest/session.pike")
/home/marcus/Pike/8.1/lib/modules/Tools.pmod/Standalone.pmod/dump.pike:355:
Tools.Standalone.dump()->dump_files()
-:1: Pike.Backend(0)->`()(3600.0)
hakua:~/Pike/8.1/build/linux-5.4.41-ppc64%
```
The failure in nameof() can be reproduced separately, although I'm not sure if this is supposed to work or not (CompatProxy is protected in 8.0::Crypto):
```
Pike v8.1 release 13 running Hilfe v3.5 (Incremental Pike Frontend)
> 8.0::Crypto.Buffer;
(1) Result: 8.0::Crypto.CompatProxy()->Buffer->State
> master()->nameof(8.0::Crypto.Buffer);
Cannot find 8.0::Crypto.CompatProxy() in 8.0::Crypto.
master.pike:5697:
master()->find_index(8.0::Crypto,8.0::Crypto.CompatProxy(),({0}),UNDEFINED)
master.pike:5924: master()->nameof(@0=8.0::Crypto.CompatProxy(),@1=({0}))
master.pike:5916: master()->nameof(8.0::Crypto.CompatProxy()->Buffer,({0}))
master.pike:5965:
master()->nameof(8.0::Crypto.CompatProxy()->Buffer->State,UNDEFINED)
>
```
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10039
Automap behavior differs for constants and variables.
2021-11-19T14:58:05Z
Henrik (Grubba) Grubbström
Automap behavior differs for constants and variables.
From the Pike mailinglist:
```
24084121 2020-06-18 11:26 +0200 /42 lines/ Mateusz Krawczuk <krawczukmat@gmail.com>
Sent by: SRS0+eNdN=77=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Imported: 2020-06-18 11:27 by Brevbäraren
Ext...
From the Pike mailinglist:
```
24084121 2020-06-18 11:26 +0200 /42 lines/ Mateusz Krawczuk <krawczukmat@gmail.com>
Sent by: SRS0+eNdN=77=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Imported: 2020-06-18 11:27 by Brevbäraren
External recipient: Pike Development List <pike-devel@lists.lysator.liu.se>
To: Pike (-) developers forum <21001>
Subject: an automap bug
```
------------------------------------------------------------
Reproduces both on pike 8 from apt repository and pike compiled on master:
```
$ ./pike -v
Pike v8.1 release 13 Copyright © 1994-2018 Linköping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are
welcome to redistribute it under certain conditions; read the files
COPYING and COPYRIGHT in the Pike distribution for more details.
$
$ cat automap1.pike
int main() {
write( "%O\n", combine_path("foo", ({ "abc", "cde" })[*] ) );
}
$
$ cat automap2.pike
int main() {
string s = "foo";
write("%O\n", combine_path(s, ({ "abc", "cde" })[*] ) );
}
$
$ ./pike automap1.pike
({ /* 2 elements */
"foo/abc",
"foo/cde"
})
$
$ ./pike automap2.pike
automap2.pike:4:[*] not supported here.
Pike: Failed to compile script.
$
$ pike -v
Pike v8.0 release 498 Copyright © 1994-2017 Linköping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are
welcome to redistribute it under certain conditions; read the files
COPYING and COPYRIGHT in the Pike distribution for more details.
$ pike automap1.pike
({ /* 2 elements */
"foo/abc",
"foo/cde"
})
$
$ pike automap2.pike
automap2.pike:4:[*] not supported here.
```
(24084121) /Mateusz Krawczuk <krawczukmat@gmail.com>/
https://git.lysator.liu.se/pikelang/pike/-/issues/10040
Warnings in __builtin.Nettle.Hash
2020-08-15T12:54:22Z
Henrik (Grubba) Grubbström
Warnings in __builtin.Nettle.Hash
The following warnings cause the testsuite to fail:
```
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:477: Warning: An expression of type int cannot be assigned to a variable of type void | int(0..).
.../lib/modules/__builtin.pmod...
The following warnings cause the testsuite to fail:
```
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:477: Warning: An expression of type int cannot be assigned to a variable of type void | int(0..).
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:578: Warning: An expression of type string cannot be assigned to a variable of type string(8bit).
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:911: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1258: Warning: An expression of type string cannot be assigned to a variable of type string(8bit).
.../lib/modules/__builtin.pmod/Nettle.pmod/Hash.pike:1321: Warning: An expression of type string cannot be assigned to a variable of type string(8bit).
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10041
Warnings in Standards.ASN1.Types
2020-07-23T12:44:25Z
Henrik (Grubba) Grubbström
Warnings in Standards.ASN1.Types
The following warnings cause the testsuite to fail:
```
.../lib/modules/Standards.pmod/ASN1.pmod/Types.pmod:184: Warning: An expression of type array(object) cannot be assigned to a variable of type array({ Object = object(implements obj...
The following warnings cause the testsuite to fail:
```
.../lib/modules/Standards.pmod/ASN1.pmod/Types.pmod:184: Warning: An expression of type array(object) cannot be assigned to a variable of type array({ Object = object(implements object(.../lib/modules/Standards.pmod/ASN1.pmod/Types.pmod).Object) }).
.../lib/modules/Standards.pmod/ASN1.pmod/Types.pmod:353: Warning: An expression of type mixed cannot be assigned to a variable of type { mpz = object(implements _static_modules.Gmp()->mpz) }.
.../lib/modules/Standards.pmod/ASN1.pmod/Types.pmod:518: Warning: An expression of type int cannot be assigned to a variable of type int(8bit).
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10042
Warnings in Val
2020-07-09T12:23:54Z
Henrik (Grubba) Grubbström
Warnings in Val
The following warnings cause the testsuite to fail:
```
.../lib/modules/Val.pmod/module.pmod:600: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:601: Warni...
The following warnings cause the testsuite to fail:
```
.../lib/modules/Val.pmod/module.pmod:600: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:601: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:602: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:630: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:631: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:632: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:645: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:646: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:647: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:868: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
.../lib/modules/Val.pmod/module.pmod:872: Warning: An expression of type int | mixed cannot be assigned to a variable of type int.
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10043
Warning in Crypto.SHA1
2020-07-10T08:37:23Z
Henrik (Grubba) Grubbström
Warning in Crypto.SHA1
The following warning causes the testsuite to fail:
```
.../lib/modules/Crypto.pmod/SHA1.pmod:45: An expression of type int cannot be assigned to a variable of type int(8bit).
```
The following warning causes the testsuite to fail:
```
.../lib/modules/Crypto.pmod/SHA1.pmod:45: An expression of type int cannot be assigned to a variable of type int(8bit).
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10044
Warning in 7.8::Crypto.DSA
2023-01-01T12:58:10Z
Henrik (Grubba) Grubbström
Warning in 7.8::Crypto.DSA
The following warning causes the testsuite to fail:
```
.../lib/7.8/modules/Crypto.pmod/DSA.pike:193: An expression of type mixed cannot be assigned to a variable of type { mpz = object(implements _static_modules.Gmp()->mpz) }.
```
The following warning causes the testsuite to fail:
```
.../lib/7.8/modules/Crypto.pmod/DSA.pike:193: An expression of type mixed cannot be assigned to a variable of type { mpz = object(implements _static_modules.Gmp()->mpz) }.
```
Pike 9.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10045
Warning in Crypto.DH
2020-07-26T10:38:00Z
Henrik (Grubba) Grubbström
Warning in Crypto.DH
The following warning causes the testsuite to fail:
```
.../lib/modules/Crypto.pmod/DH.pmod:77: Warning: An expression of type mixed cannot be assigned to a variable of type { mpz = object(implements _static_modules.Gmp()->mpz) }.
```
The following warning causes the testsuite to fail:
```
.../lib/modules/Crypto.pmod/DH.pmod:77: Warning: An expression of type mixed cannot be assigned to a variable of type { mpz = object(implements _static_modules.Gmp()->mpz) }.
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10046
Warning in Standards.PEM
2020-07-11T11:27:59Z
Henrik (Grubba) Grubbström
Warning in Standards.PEM
The following warning causes the testsuite to fail:
```
.../lib/modules/Standards.pmod/PEM.pmod:202: Warning: An expression of type array(object(implements object(/home/grubba/src/Pike/8.1/lib/modules/Standards.pmod/PEM.pmod).Message) | ...
The following warning causes the testsuite to fail:
```
.../lib/modules/Standards.pmod/PEM.pmod:202: Warning: An expression of type array(object(implements object(/home/grubba/src/Pike/8.1/lib/modules/Standards.pmod/PEM.pmod).Message) | string) cannot be assigned to a variable of type array({ Message = object(implements object(/home/grubba/src/Pike/8.1/lib/modules/Standards.pmod/PEM.pmod).Message) }).
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10047
Warnings in Crypto.Pipe
2020-07-12T12:23:51Z
Henrik (Grubba) Grubbström
Warnings in Crypto.Pipe
The following warnings cause the testsuite to fail:
```
.../lib/modules/Crypto.pmod/Pipe.pike:33: Warning: An expression of type array(array | object | mixed) cannot be assigned to a variable of type array({ CipherState = object(implemen...
The following warnings cause the testsuite to fail:
```
.../lib/modules/Crypto.pmod/Pipe.pike:33: Warning: An expression of type array(array | object | mixed) cannot be assigned to a variable of type array({ CipherState = object(implements Nettle.Cipher()->State) }).
.../lib/modules/Crypto.pmod/Pipe.pike:38: Warning: An expression of type array(object) cannot be assigned to a variable of type array({ CipherState = object(implements Nettle.Cipher()->State) }).
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10048
Extend type-checker to use lfun types when checking efun calls with objects.
2022-09-08T13:02:34Z
Henrik (Grubba) Grubbström
Extend type-checker to use lfun types when checking efun calls with objects.
Currently the type checker resolves typical efun calls with objects to returning mixed, even though it may have knowledge about the object implementing the corresponding lfun(s).
Now that #10033 has been fixed, we get quite a few warnin...
Currently the type checker resolves typical efun calls with objects to returning mixed, even though it may have knowledge about the object implementing the corresponding lfun(s).
Now that #10033 has been fixed, we get quite a few warnings due to operators returning mixed.
https://git.lysator.liu.se/pikelang/pike/-/issues/10051
Protocols.DNS.async_client does not like when the callback function has been ...
2020-08-18T11:50:09Z
Henrik (Grubba) Grubbström
Protocols.DNS.async_client does not like when the callback function has been destructed.
Seen in the wild (Pike 8.0.354 patched to 5cf5f2a4b8ededbb0bc03f3eabc9bc97a71d61b9 (aka `rxnpatch/2020-03-25T110609`)):
```
Internal server error: Attempt to call the NULL-value
Unknown program: 0("foo.examle.com",0,0,80)
pike/lib/module...
Seen in the wild (Pike 8.0.354 patched to 5cf5f2a4b8ededbb0bc03f3eabc9bc97a71d61b9 (aka `rxnpatch/2020-03-25T110609`)):
```
Internal server error: Attempt to call the NULL-value
Unknown program: 0("foo.examle.com",0,0,80)
pike/lib/modules/Protocols.pmod/DNS.pmod:2014: Protocols.DNS.global_async_client
->generic_get("foo.example.com",0,-1,0,1,"a","foo.example.com",0,0,80)
pike/lib/modules/Protocols.pmod/DNS.pmod:1909: Protocols.DNS.global_async_client
->remove(Protocols.DNS.global_async_client->Request())
base_server/roxenloader.pike (53ed4390):269: Protocols.DNS.global_async_client->
remove->`()(@0=Protocols.DNS.global_async_client->Request())
-:1: Pike.Backend(0)->`()(3600.0)
```
Pike 8.0
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10054
Type mark stack underflow
2022-09-21T10:01:20Z
Henrik (Grubba) Grubbström
Type mark stack underflow
`compiler_bug.pike`:
```
int(0..0) array(mapping) foobar() {
return ({});
}
```
```
$ pike --version
Pike v8.0 release 702 Copyright © 1994-2018 Linköping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you...
`compiler_bug.pike`:
```
int(0..0) array(mapping) foobar() {
return ({});
}
```
```
$ pike --version
Pike v8.0 release 702 Copyright © 1994-2018 Linköping University
Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are
welcome to redistribute it under certain conditions; read the files
COPYING and COPYRIGHT in the Pike distribution for more details.
$ pike compiler_bug.pike
compiler_bug.pike:1:array is a reserved word.
/var/tmp/portage/dev-lang/pike-8.0.702/work/Pike-v8.0.702/src/pike_types.c:707: Fatal error:
Type mark stack underflow
/var/tmp/portage/dev-lang/pike-8.0.702/work/Pike-v8.0.702/src/pike_types.c:707: Fatal error:
Type mark stack underflow
Aborted
```
Pike 7.8
https://git.lysator.liu.se/pikelang/pike/-/issues/10058
Xcode12 fails to ./configure due to -Wimplicit-function-declaration
2021-12-10T14:57:04Z
Mitchell Blank
Xcode12 fails to ./configure due to -Wimplicit-function-declaration
Compiling Pike-v8.0.702 on MacOS 11 with Xcode 12 one encounters an issue common to a lot of autoconf scripts -- broken tests due to the change to `-Werror,-Wimplicit-function-declaration`
Xcode 12 decided to make this warning an error ...
Compiling Pike-v8.0.702 on MacOS 11 with Xcode 12 one encounters an issue common to a lot of autoconf scripts -- broken tests due to the change to `-Werror,-Wimplicit-function-declaration`
Xcode 12 decided to make this warning an error by default in C code. One place this tends to bite in a subtle way is inside of autoconf scripts, since there a failure will usually be silent unless it causes something to be misdetected. Indeed, when building pike the build ends up failing with:
```
Configuration error: No way to set nonblocking I/O
```
If you search for `Werror` in the config.log lines you see lots and lots of examples:
```
./build/darwin-20.1.0-x86_64/modules/_Image_JPEG/config.log:conftest.c:27:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Image_TIFF/config.log:conftest.c:48:26: error: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:116:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:134:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:141:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:135:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:103:63: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Stdio/config.log:conftest.c:136:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_real_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_real_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_real_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_real_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_real_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Mysql/config.log:conftest.c:39:3: error: implicit declaration of function 'mysql_connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/system/config.log:conftest.c:116:14: error: implicit declaration of function 'setprgp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/system/config.log:conftest.c:118:3: error: implicit declaration of function 'gethostbyname_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/system/config.log:conftest.c:118:7: error: implicit declaration of function 'gethostbyname_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/system/config.log:conftest.c:117:3: error: implicit declaration of function 'getservbyname_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/system/config.log:conftest.c:118:7: error: implicit declaration of function 'getservbyname_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/sybase/config.log:conftest.c:32:11: error: implicit declaration of function 'cs_ctx_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/sybase/config.log:conftest.c:33:11: error: implicit declaration of function 'ct_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_math/config.log:conftest.c:28:5: error: implicit declaration of function 'fpsetround' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/_Image_XFace/config.log:conftest.c:45:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Wnotify/config.log:conftest.c:33:3: error: implicit declaration of function 'FindFirstChangeNotification' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/modules/Wnotify/config.log:conftest.c:34:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '_bswap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '_bswap64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '_bit_scan_reverse' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '_bit_scan_forward' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:64:12: error: implicit declaration of function '_byteswap_ulong' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:64:12: error: implicit declaration of function '_byteswap_uint64' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '__cntlz4' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '__cntlz8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '__cnttz4' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:12: error: implicit declaration of function '__cnttz8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:59:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:y.tab.c:1206:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.y:42:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:y.tab.c:1206:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.y:42:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:y.tab.c:1208:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:1: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:y.tab.c:1208:16: error: implicit declaration of function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:1: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:62:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:61:14: error: implicit declaration of function 'bar' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:174:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:168:30: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:239:3: error: implicit declaration of function 'mkdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:225:17: error: implicit declaration of function 'infnan' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:228:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:224:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:224:8: error: implicit declaration of function '_isnan' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:225:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:234:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:245:25: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:249:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:251:3: error: implicit declaration of function 'fpsetmask' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:252:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:255:3: error: implicit declaration of function 'fpsetround' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:256:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:253:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:253:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:245:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:259:24: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:250:3: error: implicit declaration of function 'GetSystemTimeAsFileTime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:251:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:253:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:249:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:245:42: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:245:33: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:260:17: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:245:19: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:258:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:261:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:258:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:261:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:255:3: error: implicit declaration of function 'write' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:289:8: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:292:10: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:251:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:251:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:250:3: error: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:252:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:/Users/mitch/Pike-v8.0.702/src/fd_control.c:300:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:341:7: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:351:7: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:360:7: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:367:29: error: implicit declaration of function 'inet_addr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:416:4: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:439:7: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:276:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:258:1: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:254:14: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
./build/darwin-20.1.0-x86_64/config.log:conftest.c:8:3: error: implicit declaration of function 'testfunc2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
```
The number one cause of this type of failure is calling `exit()` without `#include <stdlib.h>` first. However, in my experience the fastest way to solve *that* particular one is to adjust the tests to just `return` from `main()` instead. E.g. here is one recent PR I made for a smaller project: https://github.com/jca02266/lha/pull/18/files
However in the case of pike there are a lot of other functions that are called without the proper header inclusion. For the time being I am going to work around it in Homebrew by adding `CFLAGS=-Wno-implicit-function-declaration` but long-term the configure.in files should be cleaned up to not generate these errors.
Pike 8.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10070
pthread_cond_timedwait() does not normalize tv_nsec
2021-11-26T17:10:22Z
Henrik (Grubba) Grubbström
pthread_cond_timedwait() does not normalize tv_nsec
`pthread_cond_timedwait()` on several OSes (including Linux and MacOS X) apparently does not normalize `tv_nsec`. A timeout with a `tv_sec` of `0` and a `tv_nsec` value above `1000000000` seems to give a zero timeout.
Make `co_wait_time...
`pthread_cond_timedwait()` on several OSes (including Linux and MacOS X) apparently does not normalize `tv_nsec`. A timeout with a `tv_sec` of `0` and a `tv_nsec` value above `1000000000` seems to give a zero timeout.
Make `co_wait_timeout()` normalize `tv_nsec`.
Pike 8.0
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10072
SIGSEGV in Crypto.AES.CCM
2021-12-03T17:43:18Z
Henrik (Grubba) Grubbström
SIGSEGV in Crypto.AES.CCM
From LysLysKOM
```
25080935 igår 21:18 /27 rader/ Niels Möller (entering a radioactive zone)
Mottagare: Pike (-) developers forum <21270>
Mottagare: Niels Möller (entering a radioactive zone) <104958>
Mottaget: igår 21:18
Ärende: Bu...
From LysLysKOM
```
25080935 igår 21:18 /27 rader/ Niels Möller (entering a radioactive zone)
Mottagare: Pike (-) developers forum <21270>
Mottagare: Niels Möller (entering a radioactive zone) <104958>
Mottaget: igår 21:18
Ärende: Bug in ccm glue?
```
------------------------------------------------------------
Hi, I've received a bug report (from someone at Opera) about a crash
when using Crypto.AES.CCM. Example
```
int main() {
mixed state1 = Crypto.AES.CCM.State();
state1->set_encrypt_key(String.hex2string("bedcfb5a011ebc84600fcb296c15af0d"));
state1->set_iv(String.hex2string("438a547a94ea88dce46c6c85"));
state1->update(String.hex2string(""));
string ct = state1->crypt(String.hex2string(""));
state1->digest();
return 0;
}
```
When I try it (with Pike v8.0, installed as a debian package on
x86_64) it segfaults in nettle_memxor3. As far as I can tell from 5
minutes of printf debugging, crash is inside the call to ->digest().
The set_iv method looks a bit suspicious to me, it doesn't include the
required arguments for the nettle function ccm_set_nonce (and ccm is
generally a bit messier to setup than most other modes). See
http://www.lysator.liu.se/~nisse/nettle/nettle.html#index-ccm_005fset_005fnonce
There may of course be some problem in the nettle library too, in
particular, I would be happier if api misuse resulted in an assert
failure rather than a segfault.
```
(25080935) /Niels Möller (entering a radioactive zone)/
```
Pike 8.0
Henrik (Grubba) Grubbström
Henrik (Grubba) Grubbström
https://git.lysator.liu.se/pikelang/pike/-/issues/10073
Crypto.AES.CCM Documentation Lacks IV Truncation Information
2023-01-01T12:56:05Z
Joshua Rogers
Crypto.AES.CCM Documentation Lacks IV Truncation Information
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....
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/10078
Crypto.ECC.SECP_521R1 does not verify valid signatures.
2023-05-15T08:16:54Z
Joshua Rogers
Crypto.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/10094
Standards.IIM.get_information() returns ([]) for some files that have IPTC-II...
2022-11-16T10:16:08Z
Henrik (Grubba) Grubbström
Standards.IIM.get_information() returns ([]) for some files that have IPTC-IIM metadata.
```
Pike v8.0 release 1783 running Hilfe v3.5 (Incremental Pike Frontend)
> Stdio.File fd = Stdio.File("iim.jpg", "rb");
> Standards.IIM.get_information(fd);
(1) Result: ([ ])
```
Enabling the `werrors` in `decode_photoshop_data()` gives...
```
Pike v8.0 release 1783 running Hilfe v3.5 (Incremental Pike Frontend)
> Stdio.File fd = Stdio.File("iim.jpg", "rb");
> Standards.IIM.get_information(fd);
(1) Result: ([ ])
```
Enabling the `werrors` in `decode_photoshop_data()` gives:
```
> Standards.IIM.get_information(fd);
blocks: ({ /* 1 element */
"\4iptc\0\0\0\1\265\34\2\5\0.Britain Scotland Ukraine Nations League Soccer\34\2\n"
"\0\1""5\34\2\17\0\1S\34\2\24\0\bSOC WSOC\34\2""7\0\b20220921\34\2<\0\v152917+0000\34\2P\0\rScott Heppell\34\2U\0\3STR\34\2Z\0\aGlasgow\34\2e\0\3GBR\34\2n\0\2AP\34\2s\0\2AP\34\2t\0""8Copyright 2022 The Associated Press. All rights reserved\34\2x\0\307Ukrainian fans cheer prior to the star of the UEFA Nations League soccer match between Scotland and Ukraine, at Hampden Park, in Glasgow, Scotland, Wednesday, Sept. 21, 2022. (AP Photo/Scott Heppell)\34\2z\0\2HA\0"
})
block: "046970746300000001b51c0205002e4272697461696e2053636f746c616e6420556b7261696e65204e6174696f6e73204c656167756520536f636365721c020a0001351c020f0001531c02140008534f432057534f431c0237000832303232303932311c023c000b3135323931372b303030301c0250000d53636f74742048657070656c6c1c025500035354521c025a0007476c6173676f771c026500034742521c026e000241501c0273000241501c02740038436f70797269676874203230323220546865204173736f6369617465642050726573732e20416c6c207269676874732072657365727665641c027800c7556b7261696e69616e2066616e73206368656572207072696f7220746f207468652073746172206f66207468652055454641204e6174696f6e73204c656167756520736f63636572206d61746368206265747765656e2053636f746c616e6420616e6420556b7261696e652c2061742048616d7064656e205061726b2c20696e20476c6173676f772c2053636f746c616e642c205765646e65736461792c20536570742e2032312c20323032322e202841502050686f746f2f53636f74742048657070656c6c291c027a0002484100"
dsclen: 4
block_length: 1
actual length: 1
info: "\265"
Short info "\265"
(1) Result: ([ ])
```
The cause seems to be that there is an extra byte of NUL-padding after the Photoshop 6.0 header description text ("iptc"). https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ says that the pascal string should be padded to an even length (ie including the length byte).
Pike 8.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10096
aggregate_mapping() type checker performance issue
2022-10-18T15:45:48Z
Henrik (Grubba) Grubbström
aggregate_mapping() type checker performance issue
```
Pike v8.1 release 18 running Hilfe v3.5 (Incremental Pike Frontend)
> int t = gethrtime(); typeof(([ 1: `==, 2:`<=, 4: `< ])); gethrtime() - t;
(1) Result: mapping(int(1..2) | int(4):function(int | float ... : int(1bit)) | function(s...
```
Pike v8.1 release 18 running Hilfe v3.5 (Incremental Pike Frontend)
> int t = gethrtime(); typeof(([ 1: `==, 2:`<=, 4: `< ])); gethrtime() - t;
(1) Result: mapping(int(1..2) | int(4):function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | scope(0,function(int | float, int | float, int | float ... : int(1bit)) | function(($0=array | mapping | multiset | string), $0, $0 ... : int(1bit)) | function(function | object | program, mixed, mixed ... : int(1bit)) | function(mixed, function | object | program, mixed ... : int(1bit)) | function(type(mixed), type(mixed), function | program | type(mixed) ... : int(1bit)) | function(($0=array | mapping | multiset | string), ~$0 ... : zero)) | ~function(~mixed ... : mixed) & function(mixed ... : int(1bit)))
(2) Result: 40760
> int t = gethrtime(); typeof(([ 1:`==, 2: `<=, 4: `<, 5: `> ])); gethrtime() - t;
(3) Result: mapping(int(1..2) | int(4..5):function(int | float ... : int(1bit)) | function(string ... : int(1bit)) | function(program | type(mixed), program | type(mixed), program | type(mixed) ... : int(1bit)) | scope(0,function(int | float, int | float, int | float ... : int(1bit)) | function(($0=array | mapping | multiset | string), $0, $0 ... : int(1bit)) | function(function | object | program, mixed, mixed ... : int(1bit)) | function(mixed, function | object | program, mixed ... : int(1bit)) | function(type(mixed), type(mixed), function | program | type(mixed) ... : int(1bit)) | function(($0=array | mapping | multiset | string), ~$0 ... : zero)) | ~function(~mixed ... : mixed) & function(mixed ... : int(1bit)))
(4) Result: 42070381
```
The time taken for the second statement is ~42 seconds (~1000 times slower than the first).
Doing
```
> int t = gethrtime(); typeof(([ 1:`==, 2: `<=, 3: `!=, 4: `<, 5: `> ])); gethrtime() - t;
```
essentially hangs the compiler.
Pike 9.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10104
Define the behavior of catch vis a vis local variables defined in the block.
2022-12-21T15:42:21Z
Henrik (Grubba) Grubbström
Define 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.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10107
Parser.Markdown: Bogus output when using code fences
2023-04-07T12:55:59Z
Henrik (Grubba) Grubbström
Parser.Markdown: Bogus output when using code fences
Issue copied from https://github.com/pikelang/Pike/issues/40
The following code
~~~pike
constant MD = #"
## Some Stuff
```html
<head></head>
```
Some text post code fence
";
int main(int argc, array(string) argv) {
string html = ...
Issue copied from https://github.com/pikelang/Pike/issues/40
The following code
~~~pike
constant MD = #"
## Some Stuff
```html
<head></head>
```
Some text post code fence
";
int main(int argc, array(string) argv) {
string html = Parser.Markdown.parse(MD);
werror("%s", html);
}
~~~
generates the following output:
```html
<h2 id="some-stuff">Some Stuff</h2>
<pre><code class='lang-html'>
<head></head>
</code></pre>
<head></head><p>Some text post code fence</p>
```
But this is what's expected:
```html
<h2 id="some-stuff">Some Stuff</h2>
<pre><code class='lang-html'>
<head></head>
</code></pre>
<p>Some text post code fence</p>
```
https://git.lysator.liu.se/pikelang/pike/-/issues/10111
Calendar module in Pike 8.0 is broken near 1900-01-01T00:00:00 in some timezo...
2023-08-22T10:59:14Z
Henrik (Grubba) Grubbström
Calendar module in Pike 8.0 is broken near 1900-01-01T00:00:00 in some timezones.
```
$ TZ=UTC pike
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> Calendar.dwim_time("19000101T000000");
(1) Result: Second(Mon 1 Jan 1900 0:00:00 UTC)
$ TZ=Europe/Stockholm pike
Pike v8.0 release 1738 running Hil...
```
$ TZ=UTC pike
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> Calendar.dwim_time("19000101T000000");
(1) Result: Second(Mon 1 Jan 1900 0:00:00 UTC)
$ TZ=Europe/Stockholm pike
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> Calendar.dwim_time("19000101T000000");
Failed to dwim time from "19000101T000000"
/usr/lib64/pike/modules/Calendar.pmod/YMD.pike:3303:
ISO.dwim_time("19000101T000000",UNDEFINED)
> Calendar.dwim_time("19000101T000013");
Failed to dwim time from "19000101T000013"
/usr/lib64/pike/modules/Calendar.pmod/YMD.pike:3303:
ISO.dwim_time("19000101T000013",UNDEFINED)
> Calendar.dwim_time("19000101T000014");
(1) Result: Second(Mon 1 Jan 1900 0:00:00 CET)
> Calendar.dwim_time("18991231T23:59:59");
(2) Result: Second(Sun 31 Dec 1899 23:59:59 SET)
> Calendar.dwim_time("19000101T000015");
(3) Result: Second(Mon 1 Jan 1900 0:00:01 CET)
```
Note that when the parsing succeeds, the resulting seconds count is off by 14 seconds.
The above works fine in Pike 9.0 (aka master):
```
$ TZ=Europe/Stockholm ./pike
Pike v9.0 release 0 running Hilfe v3.5 (Incremental Pike Frontend)
> Calendar.dwim_time("19000101T000000");
(1) Result: Second(Mon 1 Jan 1900 0:00:00 CET)
```
Pike 8.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10121
Filesystem.System()->find() is broken.
2023-08-22T10:59:14Z
Henrik (Grubba) Grubbström
Filesystem.System()->find() is broken.
The filtering of in `find()` attempts to call the value `1` (if there are any subdirectories). This seems to be code that was missed in 9ae59318485754881ba0798de5dfac12c1abede9:
```
array find(void|function(Filesystem.Stat, __unknown__.....
The filtering of in `find()` attempts to call the value `1` (if there are any subdirectories). This seems to be code that was missed in 9ae59318485754881ba0798de5dfac12c1abede9:
```
array find(void|function(Filesystem.Stat, __unknown__...:int) mask,
mixed ... extra)
{
array(Filesystem.Stat) res = ({});
array(Filesystem.Stat) d = get_stats() || ({});
array(Filesystem.Stat) r = filter(d, "isdir");
```
Pike 8.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10129
System.TM timezone confusion
2023-11-04T09:09:09Z
Henrik (Grubba) Grubbström
System.TM timezone confusion
From LysLysKOM 26017901:
```
26017901 2023-10-12 17:13 /39 rader/ ceder (-) Per Cederqvist
Mottagare: Pike (-) developers forum <21425>
Ärende: System.TM timezone confusion
------------------------------------------------------------
``...
From LysLysKOM 26017901:
```
26017901 2023-10-12 17:13 /39 rader/ ceder (-) Per Cederqvist
Mottagare: Pike (-) developers forum <21425>
Ärende: System.TM timezone confusion
------------------------------------------------------------
```
System.TM does not work as advertised. The documentation says that
the timezone will be UTC when you supply a number to the constructor,
but that does not appear to be the case. Note how the timezone is
CEST no matter how I initialize the TM object, but the reported hours
differ:
```
$ pike
Pike v9.0 release 1 running Hilfe v3.5 (Incremental Pike Frontend)
> mixed t = System.TM(1697121800);
> t;
(1) Result: System.TM(Thu Oct 12 15:43:20 2023 CEST)
> t->gmtime(1697121800);
(2) Result: 1
> t;
(3) Result: System.TM(Thu Oct 12 15:43:20 2023 CEST)
> t->localtime(1697121800);
(4) Result: 1
> t;
(5) Result: System.TM(Thu Oct 12 16:43:20 2023 CEST)
```
The result (5) makes sense: it matches what I would expect. But
the hour should be set to 14, not 15:
```
> mixed c = Calendar.ISO.Second(1697121800);
> c->set_timezone("UTC");
> c;
(5) Result: Second(Thu 12 Oct 2023 16:43:20 CEST)
> mixed u = c->set_timezone("UTC");
> u;
(6) Result: Second(Thu 12 Oct 2023 14:43:20 UTC)
```
This also agrees with my private utility for converting a time_t value
to the local timezone and UTC (this one is written in Python):
```
$ time_t2date 1697121800
2023-10-12 16:43:20 CEST
2023-10-12 14:43:20 GMT
```
Tested on the current master, and a few older Pike versions.
```
(26017901) /ceder (-) Per Cederqvist/---------------
```
Pike 8.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10133
__ARGS__ broken in recent Pike master
2023-10-31T09:34:40Z
Henrik (Grubba) Grubbström
__ARGS__ broken in recent Pike master
Pike developers mailinglist/LysLysKOM 26044077:
```
26047339 2023-10-30 00:48 /21 rader/ Chris Angelico <rosuav@gmail.com>
Sänt av: SRS0=Zs/b=GL=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-10-30 00:48 av Brevb...
Pike developers mailinglist/LysLysKOM 26044077:
```
26047339 2023-10-30 00:48 /21 rader/ Chris Angelico <rosuav@gmail.com>
Sänt av: SRS0=Zs/b=GL=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-10-30 00:48 av Brevbäraren
Extern mottagare: Pike Developers <pike-devel@lists.lysator.liu.se>
Mottagare: Pike (-) developers forum <21435>
Ärende: Pike 9.0 quirk with implicit lambda
```
------------------------------------------------------------
```
void call(function cb) {cb(42);}
int main() {
werror("Pike version %O:\n", __VERSION__);
call() {
werror("Args: %O\n", __ARGS__);
mixed value = 1234;
werror("%O\n", lambda() {werror("%O\n", value);});
};
return 0;
}
```
In Pike 8 (tested on 8.1.15), the implicit lambda correctly receives
its `__ARGS__`, and will happily provide those as closure variables. In
Pike 9 (tested with current master, 235eb5), the inner function
somehow causes `__ARGS__` to be 0 instead of an array.
Any ideas as to what's going on here? Am I misusing implicit lambdas?
ChrisA
```
(26047339) /Chris Angelico <rosuav@gmail.com>/------
```
Pike 9.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10134
Crypto.DSA et al verify messages with various incorrect signatures.
2024-01-26T13:03:11Z
Joshua Rogers
Crypto.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,
Josh
Pike 9.0
https://git.lysator.liu.se/pikelang/pike/-/issues/10136
Private getter not marked as used.
2023-11-16T12:02:24Z
Henrik (Grubba) Grubbström
Private getter not marked as used.
Reported by Pontus Östlund:
```
$ cat bug-private-getter.pike
class Test {
private string `property_accessor() {
return "I'm private";
}
private string `unused_getter() {
return "Unused private getter";
}
public void...
Reported by Pontus Östlund:
```
$ cat bug-private-getter.pike
class Test {
private string `property_accessor() {
return "I'm private";
}
private string `unused_getter() {
return "Unused private getter";
}
public void log() {
werror("Log: %s\n", property_accessor);
}
}
int main() {
Test t = Test();
t->log();
}
```
In current Pike 8.0:
```
$ ./pike bug-private-getter.pike
bug-private-getter.pike:2: Warning: Modifier mismatch for variable property_accessor.
bug-private-getter.pike:6: Warning: Modifier mismatch for variable unused_getter.
bug-private-getter.pike:13: Warning: `property_accessor is private but not used anywhere.
bug-private-getter.pike:13: Warning: unused_getter is private but not used anywhere.
bug-private-getter.pike:13: Warning: `unused_getter is private but not used anywhere.
Log: I'm private
```
In current Pike master:
```
$ ./pike bug-private-getter.pike
bug-private-getter.pike:13: Warning: `property_accessor is private but not used anywhere.
bug-private-getter.pike:13: Warning: unused_getter is private but not used anywhere.
bug-private-getter.pike:13: Warning: `unused_getter is private but not used anywhere.
Log: I'm private
```
Pike Next
https://git.lysator.liu.se/pikelang/pike/-/issues/10139
RSA PKCS1 v1.5 decryption implementation does not detect ciphertext modificat...
2024-01-26T13:03:11Z
Joshua Rogers
RSA PKCS1 v1.5 decryption implementation does not detect ciphertext modification by prepending \0-bytes to ciphertexts
Hi there,
Another issue in RSA PKCS1 v1.5. Pike does not bork on ciphertexts that have been modified with prepended 0-bytes in their ciphertext.
A small test-case:
```
int main() {
string key = "30820943020100300d06092a864886f70d010...
Hi there,
Another issue in RSA PKCS1 v1.5. Pike does not bork on ciphertexts that have been modified with prepended 0-bytes in their ciphertext.
A small test-case:
```
int main() {
string key = "30820943020100300d06092a864886f70d01010105000482092d308209290201000282020100f601be0dccd04aa40b12f3f191ae17c1f9c8c0b68e7a77e14be25c3c7907cb1d33a6ef418ef41852f32c98392bc5c9aed91c1a1501c503eab89b3ee6f4f8eb2e0fcfc41bd03609cf6a8eb3aa6f0fbe23187b33db4d34b66d128a8aba0a2abf40bb9d13d8e2554569a57ab1d8c61b8cad2dc88599ae0da5346e15dace1bac7bf69737c22f083be9b46bb8b1eab5957b2da740275e96c87195b96fe11452159dafcfd916cee5d749a77bc3905a5ebd387ae445e8fe70f16e9a086639779ceffbfd41557bd99aea6a371a6b4b160615a1a12bc6958d34bce0c85adcbd8392fa10ceca52209d56196ba3d273ce228f1f111192aa92de2a039798a17bcecb4dc6100e6f8ae8c2643f2ae768b2255f082c978e95ca551555f10608231cf8003bbf807969fff1e51914b9a8c9b8f4564645b9e5d705ffad29663f5dae3d76652b422e43f13e6c1491090805c2d1268a74a251177427e33a9a91175c3670b91746008bce1fd231e6e4f2ad70cb43aca5f07600a6d31dd02915243dfdd943a02165da367a6b7e4dae1dd2e8b836903080795d2585076cc1c15dd9e8d2e5e047526569b1bfd395d957eb9fde325d342d14426e71efdc1887515e53cdea5834921f928629e748eed097ac4024e2bf255d70411f87373948cf8e8aa7effa2b0ab47d5166091e1aedec60568b155bd9c27bc55f3ece35f83d636dbcd5abf4853a051db94d5045020301000102820200065028224431ca35e87f82d97302c9384b4d341385ecd8510f4df94e51facf0dbfa01694139e3f00e34859db09bd087e74b2e1c1229652e73df7e49c2fb2dd9cda7f5b49d81a32e9403e4b97b6eeebfdb6e89e7d8fbf27b95282fca9668e649c68297bf367bcdc21a86dfc22132a177e4591024b5dd49ad091775271fc9d7cb6e8cd8a5858f93f4cf280bf0c1b69d675e6f760ab443fa8ee8ddf89a2a85d46a52c367c27db6d1ec6435e52eb86c7e0ab02b05543865423cc4f25346f55e1db6675e69832e43a04ccc78af3abd68477ed37698ab7f61facbdbcdb32552de5e89d8342aa9f445b8afac81bfc5bc05981ea20b340e948f710f7b3ee85f18b5c3c5832f2336706c5e9c9bd8e43d202e73a0f62776df4b715975eddd31aa643b14145057b4995556de614c57b33297bda0e05a8b8882a29563bf21686ce34c3960f905de73911987eb696e07eac0a63857e2894c3b4629477ecbf1fc76eafbb2ce4a0f00f8cdb6fbd6169e399151460522cf5b365d9bbb9587d07dac8c438982adea9ff243a86bbdf128eaa0d3a88871d8cdf081854258a651ff4226ee9749b4a6add090c159ccea06b9a10804e5fe15120cc63a5972eab0e43980dedaff321fadeea3ca60c3ba1c2980bb597ea783b80ab6eba87feb5754fd1d65d7cad6f81cf52c1a6bfebf9a75e9a316cb364d8cf467d96370871df2ee66ee1c1694a02239583910282010100fc21b855c5ad4ca2b6970516406f71c6e79efc4126e6598772db1e082de6b0dddaaa2a2951f04148e86e0bde28213b7f600f987308301eacea134062bb0c3ddf628da9abf93ef1ce3e75b0953a484dbd3554bd5c0649933dd77e527563e90f05a8013fddac958c329378e94303b304be5f9df1fe5b043a7fdd94700a3f0b1cbbd0516b7cd94c57ca96d9fd2a8ca973991218cba33a1c23d810f7519d1f7702ab72affdb3f84a1b2a88116e4033bc4d0cfc7989c657e0fe94e964476ae58bae6b7876f36c09d32b1a63f8c47c94a74c92eedf75fc27cffe0f8452363e4bc8f7653f3cb55eaf693cec70d13c875de935a8b20439ab7e93f76981c5957fc5bb44d90282010100f9c7f748a505d23ecef9a85f8097c8cf7d7028ef6c90e22a336511582d2cc3636e34ead37204dbd22f142a3fb1d5f857b0310c7a433f51ae14d4608b01b43aa8c7ae67835f7fbe0b9d97948b39e9ba2d3a1687edb8b56ee70ff0536dab4d0551f71ed0daee9e412449f5f099bcc15e4ef0554dc79f87fec5a0dea717c7054392bf444613937401bbef3c22fbf7e738c58779b981609a1f9c11dd6f0bbe9996e2773459e4cef247b02a9fc21296ac57a5b10561824310cfbdecc90e06598370e3698713fdbe2528ec4ef3dccaae701eedc3e54ad6e7af4e68e3b39bd2e97ac9119936c647a503511cb283df984cfd7c07f0f56aa8ae3166948ef3f41b0859934d0282010100815486aab0a0896bf97f13e3eb1f7f5c49195b49cc3b6277412a3688798b18f46422df479cb941b3b54e25964a3d69b897bcc8355160e58b4af29f1745dd2cabb670f634b9c058e6b3514947f2c27de5ed424f73b1e1f1be4a188911a0333f3a6688658b3ee8e3265a512e4deacadc470ee304ebb5224123afb461984fe8524fe0b6b30d32a59f6ed2dc74a96bc7cbfd1bb44e58a7092235c5d6272e12a2c862cb8c8cf5d109aa4fb1c6472875a14460c1ed5207c4b22bc494c7947eb7ca63a8cafd31361d000ddf16a2d79f13dd9140d979149b488cbf44945a5b6aaf13221bf4491ebbb7fca27ca20e221f49c3c37b89fcf2dc0e2cb63f8f8a9b7a142250590282010100b61d84ff934a4e437b16ee1b4b9fdf4ae13370b5385bde7a5464a123c0343df575f9e128ef9df944230d39cc9cf5dc0edb28b7e740b69ef024c1bfee39fcd5340ffaea0010160c535dc0920e7cd81be533d00fa554a1fc4d3e02c461569f5e7ca787f1515edf45b196b759884de652c38d5934cf92524e807b4d3b590bc39bc417ee4885a761d28ddadce6c8fdb3b961d3e7fd48064df9340a967f8b79997438841f48579a476ddb55088c308f68f2b29d01c6597a5a7c8d066284f63e37a68c3879c32aa3836675fd0eb2719883a91944561e9dd7e8aa6bb17157f08c48f8e6fae5c3e5a2bb6b5d580eec6c97ddcd9be0a49ef283a7031ad7aba8d438df4e950282010022fb8e5fcd9b767104e71244db53058c18061e1b0d1f63b73e2d59a95e2a10cd87426a33da13c287cdef8136e5e47e93fb9b30ad92628a7b543f48eb011a86356ab3cb480f27e391b018ca187d97af3d82e31861ecafa663db78aa89c3bd468e6aadefb3a43f78bc00b8014c95db54e9d21a017e8f21f671545edde9a965ea32dfff45cda37fca1aa5132f6c8eed222bd01fed5a6e7d639580c5955777a86544c2c4c939bdb8b4c486dda53072861a0334359bdb3758475e49d90d0539944e78cfcfd8fff55bb31a1cebc65b28f51e790701b2f7912188984f034e6e96e1c5251e33fe38fb221bce7a90a86857c5f56b6ca77307c45d5290b1f088ade082b349";
string privateKeyPkcs8 = String.hex2string(key);
mixed state = Standards.PKCS.parse_private_key(privateKeyPkcs8);
string ret;
string ct = String.hex2string("e4b9d12b1519d15af3a10fef8ed37f918e998c56b7d89fad34cecd08ecb9ae9b3213f1e9686be7ea525882a5f28a594963b4c16ed9207210646d0d5cac26920f92edd61b262a39f0f9a9f889da6f583c6fce47a08b0fd575b4bbd33e64da0eb390703e341ae3c4392b39360a1a623b8701ad51801e63df43237df4e816f2a1e4312099f1070c528fc10803879321e99e76104b2440cb4ca788c2eeda15a673e418ff247f8556a2c5be47bc016fc6a2a6caf4080d6004f4d8d17dae33e23c8bb4046fd91ea85560f9d68949da790ea662e32c3c44538d4a8bd555338ddbf4009a9d8b2cb42337ab138b6841c0f1d34f585ecb9c8be41a037fd79c3db489909da1328a170a4d676d62359166ba641d4ab0e6d56f26903e41dd4307742d6e76c67b88ac2f835a9d5b45de31a5e4b479e76b82b08c184a67f2b917c2f76ba8ebfe98b0071eee383de77cb5b06050eb058a5194eb8170b000b47862bf40c1baacb0e4c58210284556aee1ba1006f25618bece2e9578fb73fd389914db94343b41c407c7778e49b3aa3062c92c63e83d79aac7c7f3d1334f197b8660432f29504c6f1477f9d00a3cf56b6bba97ffbcbb5c68cd60972982bdc910419ec69bcc1cde7cdb1516706e7a51fb23da821754fc2385ccbc85ced7c7a32b9a0fd7fa71b9829a86247d1a0942546b25109079a7be7b2bff81803cd96102cdeead406b2446077b6e00");
array err = catch { ret = state->decrypt(ct); };
if(ret)
write("%s\n", ret);
}
```
This issue is similar to CVE 2020-14967, which also allowed for the prepending of \0-bytes to the ciphertext (which resulted in a buffer overflow due to difference in the expected and real length of the ct).
Cheers,
Josh
Pike 8.0