pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2023-11-28T13:44:10Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/10138gethrvtime() overflow on netbsd2023-11-28T13:44:10ZHenrik (Grubba) Grubbströmgethrvtime() overflow on netbsdFrom the Pike developers mailinglist/LysLysKOM 26092611:
```
26092611 2023-11-24 04:29 /35 rader/ <william@welliver.org>
Sänt av: SRS0=LsSK=HF=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-11-24 04:29 av Brevbär...From the Pike developers mailinglist/LysLysKOM 26092611:
```
26092611 2023-11-24 04:29 /35 rader/ <william@welliver.org>
Sänt av: SRS0=LsSK=HF=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-11-24 04:29 av Brevbäraren
Extern mottagare: pike-devel@lists.lysator.liu.se
Mottagare: Pike (-) developers forum <21444>
Ärende: gethrvtime() overflow on netbsd
------------------------------------------------------------
```
Hello all,
I've been working on a new stable release and in the course of the usual
checks, I noticed that pike farm builds are failing on netbsd (9.3). A
little investigation shows that the benchmark is effectively timing out.
I think this failure is caused by the code that limits a test to a given
amount of time.
Basically, the elapsed time is calculated as final_time - start_time as
returned by `gethrvtime()`, and it appears that on netbsd, there's (I'm
assuming) an overflow that causes the elapsed time to become negative.
It happens often enough that the total amount of time spent on a given
set of test runs becomes increasingly negative, essentially running any
test forever.
I"m sure that there's a better solution but I'd like to suggest that in
the interim, a simple check be added to ignore any negative times:
In `Tools.Shoot.run_sub()`:
From:
```
tg += (hrt - start_cpu) / 1000000.0;
```
To:
```
int te = hrt - start_cpu;
if(te < 0 ) te = 0;
tg += te / 1000000.0;
```
Does anyone have any objection to me making this change in 9.0 and 8.0?
Bill
```
(26092611) /<william@welliver.org>/-----------------
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10123Overloading of getter/setters with plain variables seems broken2023-05-16T16:06:23ZHenrik (Grubba) GrubbströmOverloading of getter/setters with plain variables seems brokenFrom `jonasw` @ Roxen Slack:
```
class Op
{
object `data() {}
string _sprintf() {
return sprintf("%s(%O)",
function_name(object_program(this)),
data || "-");
}
}
class Op1(object mupp)
{
...From `jonasw` @ Roxen Slack:
```
class Op
{
object `data() {}
string _sprintf() {
return sprintf("%s(%O)",
function_name(object_program(this)),
data || "-");
}
}
class Op1(object mupp)
{
inherit Op;
object `data() { return mupp; }
}
class Op2(object data)
{
inherit Op;
// object `data() { return this::data; }
}
class Data()
{
string _sprintf() { return "DATA"; }
}
void main()
{
object data = Data();
werror("op1: %O, op2: %O\n", Op1(data), Op2(data));
}
```
When the above is run (Pike 8.0.1832 or 9.0.1), the following is output:
```
op1: Op1(DATA), op2: Op2("-")
```
The comment in `Op2` triggers a compilation error due to the name clash between the variable `data` and the getter of the same name.
It looks like the reference to `data` in `Op()->_sprintf()` has a `local`/`inline` scope even though `data` has not been declared as such.Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10090Hilfe does not like anonymous classes with implicit create().2022-09-06T08:56:08ZHenrik (Grubba) GrubbströmHilfe does not like anonymous classes with implicit create().```
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> class (string bar){}("foo")->bar;
Compiler Error: 2: syntax error, unexpected ';'
Compiler Error: 2: Missing ')'.
Compiler Error: 3: Missing ';'.
Compiler Error:...```
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> class (string bar){}("foo")->bar;
Compiler Error: 2: syntax error, unexpected ';'
Compiler Error: 2: Missing ')'.
Compiler Error: 3: Missing ';'.
Compiler Error: 3: Unexpected end of file.
Compiler Error: 3: Missing '}'.
Compiler Error: 3: Opening '{' was here.
Compiler Error: 3: Unexpected end of file.
Compiler Error: 1: Got : string(102..111).
Compiler Error: 1: Index : string(97..114).
> dump wrapper
Last compiled wrapper:
001: mapping(string:mixed) ___hilfe = ___Hilfe->variables;
002: # 1
003: mixed ___HilfeWrapper() { return ("foo")->bar; ; }
004:
```
The same code wrapped in a lambda works fine:
```
> lambda() { return class (string bar){}("foo")->bar; }();
(1) Result: "foo"
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10060Add support for STARTTLS (RFC 3207) and Implicit TLS (RFC 8314) to Protocols....2021-03-05T16:22:12ZHenrik (Grubba) GrubbströmAdd support for STARTTLS (RFC 3207) and Implicit TLS (RFC 8314) to Protocols.SMTP.ClientSome MSA's require submitted messages to be over TLS.
Implement support for RFC 3207 and RFC 8314 to solve this.Some MSA's require submitted messages to be over TLS.
Implement support for RFC 3207 and RFC 8314 to solve this.Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10127Fix QA complaints from Gentoo Ebuild of Pike 8.0.17382023-06-29T10:13:14ZHenrik (Grubba) GrubbströmFix QA complaints from Gentoo Ebuild of Pike 8.0.1738```
* QA Notice: Binary files linked to libcrypt.so found
* But a dependency on virtual/libcrypt is not declared!
*
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/image/usr/bin/pike
*
* Please add virtual/libcrypt:= dependency
*...```
* QA Notice: Binary files linked to libcrypt.so found
* But a dependency on virtual/libcrypt is not declared!
*
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/image/usr/bin/pike
*
* Please add virtual/libcrypt:= dependency
* Gentoo bug: https://bugs.gentoo.org/699422
* Tracker bug: https://bugs.gentoo.org/798963
* See: https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation
* QA Notice: Found the following implicit function declarations in configure logs:
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:739 - _bswap
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:817 - _bswap64
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:895 - _bit_scan_reverse
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:973 - _bit_scan_forward
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1359 - _byteswap_ulong
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1439 - _byteswap_uint64
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1519 - __cntlz4
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1597 - __cntlz8
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1675 - __cnttz4
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1753 - __cnttz8
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:2046 - yylex
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:2057 - yylex
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:13522 - pthread_yield_np
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:14227 - getpid
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:23768 - infnan
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:24033 - _isnan
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26347 - fpsetmask
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26635 - fpsetround
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26954 - GetSystemTimeAsFileTime
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Fuse/config.log:203 - exit
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/HTTPLoop/config.log:723 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/HTTPLoop/config.log:729 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Mysql/config.log:883 - mysql_connect
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Mysql/config.log:1016 - mysql_connect
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Wnotify/config.log:466 - FindFirstChangeNotification
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_Stdio/config.log:2071 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_Stdio/config.log:2077 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_math/config.log:747 - fpsetround
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/system/config.log:3221 - setprgp
* Check that no features were accidentally disabled.
* See https://wiki.gentoo.org/wiki/Modern_C_porting.
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10081Protocols.DNS.client should also consider /etc/hosts.2022-03-23T11:33:17ZHenrik (Grubba) GrubbströmProtocols.DNS.client should also consider /etc/hosts.Sometimes hosts are hidden behind proxies or need to be simulated. In those cases it is useful to be able to add corresponding entries to `/etc/hosts` (or equivalent). Currently it is complicated to access stuff that needs correct host h...Sometimes hosts are hidden behind proxies or need to be simulated. In those cases it is useful to be able to add corresponding entries to `/etc/hosts` (or equivalent). Currently it is complicated to access stuff that needs correct host headers but via an alternative IP-number.
Adjust `Protocols.DNS.client()->gethostbyname()` et al to also consider `/etc/hosts`.Pike 8.0