pike issues
https://git.lysator.liu.se/pikelang/pike/-/issues
2023-01-01T12:56:05Z
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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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