ngn/k
19
63
Fork
You've already forked k
17

Bus error when loading file #30

Open
opened 2022年02月15日 02:42:50 +01:00 by growler · 26 comments
Collaborator
Copy link

When I load the attached file I get a bus error:

$ ./k repl.k
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 \l ngnbee.k
[1] 96954 bus error ./k repl.k

When I don't use repl.k I get something else:

$ ./k
\l ngnbee.k
'eoleof

Cutting and pasting the code into the repl seems to work just fine, though. COMMON.TXT comes from here.

Even if I'm doing something wrong, I'm assuming the bus error is undesirable. It looks like putting a trailing newline fixes the error.

When I load the attached file I get a bus error: ``` $ ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info \l ngnbee.k [1] 96954 bus error ./k repl.k ``` When I don't use `repl.k` I get something else: ``` $ ./k \l ngnbee.k 'eoleof ``` Cutting and pasting the code into the repl seems to work just fine, though. `COMMON.TXT` comes from [here](https://www.gutenberg.org/files/3201/files/). Even if I'm doing something wrong, I'm assuming the bus error is undesirable. It looks like putting a trailing newline fixes the error.

can reproduce

$ ./k
\l ngnbee.k
'eoleof

but not the bus error

what is your platform?

$ uname -a
can reproduce ``` $ ./k \l ngnbee.k 'eoleof ``` but not the bus error what is your platform? ``` $ uname -a ```
Author
Collaborator
Copy link

The bus error only happens when called using repl.k as mentioned. I’m on macOS. (Catalina? I'm not in front of my computer at the moment.)

The bus error only happens when called using repl.k as mentioned. I’m on macOS. (Catalina? I'm not in front of my computer at the moment.)

can't reproduce on x86_64 linux

$ ./k repl.k 
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 \l /tmp/ngnbee.k
'eoleof

it looks like reading beyond the end of a mmap'ed file.

is it possible you could run dtruss and post output when you're in front of your machine? something like $ sudo dtruss ./k repl.k

can't reproduce on x86_64 linux ``` $ ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info \l /tmp/ngnbee.k 'eoleof ``` it looks like reading beyond the end of a mmap'ed file. is it possible you could run dtruss and post output when you're in front of your machine? something like `$ sudo dtruss ./k repl.k`
Author
Collaborator
Copy link

Sure. Attached is the script session. Here is the error at the end:

dtrace: error on enabled probe ID 1689 (ID 174: syscall::read:return): invalid kernel access in action #12 at DIF offset 68
Sure. Attached is the script session. Here is the error at the end: ``` dtrace: error on enabled probe ID 1689 (ID 174: syscall::read:return): invalid kernel access in action #12 at DIF offset 68 ```
Author
Collaborator
Copy link

In case it helps, here is the dtruss running without repl.k.

In case it helps, here is the dtruss running without repl.k.

the dtrace: error on enabled probe messages are to do with SIP (System Integrity Protection). i believe they can be ignored.

both processes have mapped and unmapped "ngnbee.k" for 239 bytes.
but there's no 'eoleof error being printed for the ./k repl.k process.
very strange. i think this needs to be looked at by someone who has access to a macos, or by someone who knows ngn/k better than me.

the `dtrace: error on enabled probe` messages are to do with SIP (System Integrity Protection). i believe they can be ignored. both processes have mapped and unmapped "ngnbee.k" for 239 bytes. but there's no 'eoleof error being printed for the `./k repl.k` process. very strange. i think this needs to be looked at by someone who has access to a macos, or by someone who knows ngn/k better than me.
Owner
Copy link

thanks @growler and @effbiae
i can't repro on x86_64 linux either
we may just have to accept that some things will break on proprietary platforms like mac and windows, if the interpreter works there at all

thanks @growler and @effbiae i can't repro on x86_64 linux either we may just have to accept that some things will break on proprietary platforms like mac and windows, if the interpreter works there at all
Author
Collaborator
Copy link

That's fair enough if they're not supported. FWIW, I'm getting similar behavior even without an 'eoleof on the attached file. Posting for completeness.

That's fair enough if they're not supported. FWIW, I'm getting similar behavior even without an `'eoleof` on the attached file. Posting for completeness.
254 B

I have a similar error after building on MacOS 12.0.1 with the M1 chip (ARM).

uname -a
Darwin sice-mbp-986657.attlocal.net 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019415~1/RELEASE_ARM64_T8101 arm64
I have a similar error after building on MacOS 12.0.1 with the M1 chip (ARM). ``` uname -a Darwin sice-mbp-986657.attlocal.net 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019415~1/RELEASE_ARM64_T8101 arm64 ```

Here's the error I get when trying to load repl.k:

./k repl.k
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 'io
 ..mds[x[1]1]:{y;`0:x}2_x}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1;
 ^

However I can load a simple k program:

/ example.k
a: 42 44
./k
\l example.k
a
42 44

The error message indicates the issue is with 0:.
By the way I got the same error when compiling with both clang (13.0.0) and gcc (11.2.0).

I'm interested in figuring out how to make this work on MacOS/M1 cpu. Where would be a good place for me to start digging?

Here's the error I get when trying to load repl.k: ``` ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info 'io ..mds[x[1]1]:{y;`0:x}2_x}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1; ^ ``` However I can load a simple k program: ``` / example.k a: 42 44 ``` ``` ./k \l example.k a 42 44 ``` The error message indicates the issue is with `0:`. By the way I got the same error when compiling with both clang (13.0.0) and gcc (11.2.0). I'm interested in figuring out how to make this work on MacOS/M1 cpu. Where would be a good place for me to start digging?

it looks like LLDB is the debugger for mac. when you have lldb, you can

$ lldb -- ./k repl.k
(lldb) run

and hopefully the bus error will pop with location

additionally, you may want to add -g debug info in the makefile

it looks like LLDB is the debugger for mac. when you have lldb, you can ``` $ lldb -- ./k repl.k (lldb) run ``` and hopefully the bus error will pop with location additionally, you may want to add `-g` debug info in the makefile

actually, this report about 'io error may not be relevant to this issue
there doesn't appear to be a BUS error

actually, this report about 'io error may not be relevant to this issue there doesn't appear to be a BUS error

Thanks for the tip - I'm a newb at lldb, here's what I got after compiling with -g:

lldb ./k repl.k
(lldb) target create "./k"
Current executable set to '/Users/ashroyer-admin/repo/k/k' (arm64).
(lldb) settings set -- target.run-args "repl.k"
(lldb) run
Process 14434 launched: '/Users/ashroyer-admin/repo/k/k' (arm64)
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 'io
 ..mds[x[1]1]:{y;`0:x}2_x}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1;
 ^
Process 14434 exited with status = 1 (0x00000001)
(lldb)

Not sure how to proceed since it seems to have crashed without leaving anything behind for me to examine.

Thanks for the tip - I'm a newb at lldb, here's what I got after compiling with `-g`: ``` lldb ./k repl.k (lldb) target create "./k" Current executable set to '/Users/ashroyer-admin/repo/k/k' (arm64). (lldb) settings set -- target.run-args "repl.k" (lldb) run Process 14434 launched: '/Users/ashroyer-admin/repo/k/k' (arm64) ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info 'io ..mds[x[1]1]:{y;`0:x}2_x}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1; ^ Process 14434 exited with status = 1 (0x00000001) (lldb) ``` Not sure how to proceed since it seems to have crashed without leaving anything behind for me to examine.

Not sure how to proceed since it seems to have crashed without leaving anything behind for me to examine.

It dies in line 8 of repl.k. It may be easier to first debug tests that fail.

For example 0%0 return -0n on FreeBSD, OS X x86-64 & Linux but 0n on M1.

> Not sure how to proceed since it seems to have crashed without leaving anything behind for me to examine. It dies in line 8 of repl.k. It may be easier to first debug tests that fail. For example 0%0 return -0n on FreeBSD, OS X x86-64 & Linux but 0n on M1.
Author
Collaborator
Copy link

FWIW, poking around I found this fork: https://codeberg.org/ngn/k/compare/master...jrcd:master

FWIW, poking around I found this fork: https://codeberg.org/ngn/k/compare/master...jrcd:master
Author
Collaborator
Copy link

FWIW, I tried it and it didn't work out of the box, but there might be some clues there as to what to look for.

FWIW, I tried it and it didn't work out of the box, but there might be some clues there as to what to look for.

I have a similar error after building on MacOS 12.0.1 with the M1 chip (ARM).

uname -a
Darwin sice-mbp-986657.attlocal.net 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019415~1/RELEASE_ARM64_T8101 arm64

Hey @AlexShroyer. How did you compile ngn/k on apple M1 chip? I tried it compiling with CC=gcc-11 make but I am getting Undefined symbols for architecture arm64 errors for symbols like _chdir, _close, _connect, _dup2... etc.

> I have a similar error after building on MacOS 12.0.1 with the M1 chip (ARM). > > ``` > uname -a > Darwin sice-mbp-986657.attlocal.net 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019415~1/RELEASE_ARM64_T8101 arm64 > ``` Hey @AlexShroyer. How did you compile ngn/k on apple M1 chip? I tried it compiling with `CC=gcc-11 make` but I am getting `Undefined symbols for architecture arm64` errors for symbols like `_chdir`, `_close`, `_connect`, `_dup2`... etc.

Hey @ihsan I compiled by first removing the -march=native line from makefile then build using make k-libc.

Here's a minimal error report. Trying to load a file with 0: generates the error:

./k
0:"makefile"
'io
 0:"makefile"
 ^
Hey @ihsan I compiled by first removing the `-march=native` line from `makefile` then build using `make k-libc`. Here's a minimal error report. Trying to load a file with `0:` generates the error: ``` ./k 0:"makefile" 'io 0:"makefile" ^ ```

Thanks to Traws for the suggestion, based on their fork for Windows: github.com/traws0/ngnk-windows@67b7e8e14a

The following patch fixes the 0: errors for me on M1 mac:

diff --git a/a.h b/a.h
index 00f2938..9bffc01 100644
--- a/a.h
+++ b/a.h
@@ -23,7 +23,7 @@
 #define S static
 #define SZ sizeof
 #define ZZ(x) (SZ(x)/SZ((x)[0]))
-#define ZP 4096ll //page
+#define ZP 65536ll //page
 #define ZA 32ll //hdr
 #define NI __attribute__((noinline))
 #define SN S NI
diff --git a/makefile b/makefile
index 2600525..c862a0a 100644
--- a/makefile
+++ b/makefile
@@ -10,7 +10,7 @@ w:k o/w/fs.h o/w/k.wasm o/w/index.html $(patsubst w/x/%.k,o/w/x/%.k,$(wildcard w
 h:w o/w/http;cd o/w;./http
 
 k-dflt:; $(MAKE) a N=$@ R=k O='-O3 -march=native -nostdlib -ffreestanding' L=''
-k-libc:; $(MAKE) a N=$@ R=k O='-O3 -march=native -Dlibc' L='-lm' STRIP=true
+k-libc:; $(MAKE) a N=$@ R=k O='-O3 -Dlibc' L='-lm' STRIP=true
 k-obsd:; $(MAKE) a N=$@ R=k O='-fPIC -Dlibc=1 -DSYS_getcwd=304 -Dstrchrnul=strchr' L='--static -fno-pie -lm -lc' STRIP=true
 k-wasi:; $(MAKE) a N=$@ R=k O='-O3 -target wasm32-wasi -nostdlib -ffreestanding -Dwasm -U__SIZEOF_INT128__ -I/usr/include' STRIP=true CC=clang
 libk.so:;$(MAKE) a N=$@ R=$@ O='-O3 -march=native -nostdlib -ffreestanding -fPIC -Dshared' L='-shared' STRIP=true

Note for Apple M1 users, if your LLVM/Clang version is 15 or greater, you do not need to remove -march=native. Support for this feature was added in Clang 15.

Thanks to Traws for the suggestion, based on their fork for Windows: https://github.com/traws0/ngnk-windows/commit/67b7e8e14a4bf99ea52c0fe38fdbac4b1f034bd0 The following patch fixes the `0:` errors for me on M1 mac: ``` diff --git a/a.h b/a.h index 00f2938..9bffc01 100644 --- a/a.h +++ b/a.h @@ -23,7 +23,7 @@ #define S static #define SZ sizeof #define ZZ(x) (SZ(x)/SZ((x)[0])) -#define ZP 4096ll //page +#define ZP 65536ll //page #define ZA 32ll //hdr #define NI __attribute__((noinline)) #define SN S NI diff --git a/makefile b/makefile index 2600525..c862a0a 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,7 @@ w:k o/w/fs.h o/w/k.wasm o/w/index.html $(patsubst w/x/%.k,o/w/x/%.k,$(wildcard w h:w o/w/http;cd o/w;./http k-dflt:; $(MAKE) a N=$@ R=k O='-O3 -march=native -nostdlib -ffreestanding' L='' -k-libc:; $(MAKE) a N=$@ R=k O='-O3 -march=native -Dlibc' L='-lm' STRIP=true +k-libc:; $(MAKE) a N=$@ R=k O='-O3 -Dlibc' L='-lm' STRIP=true k-obsd:; $(MAKE) a N=$@ R=k O='-fPIC -Dlibc=1 -DSYS_getcwd=304 -Dstrchrnul=strchr' L='--static -fno-pie -lm -lc' STRIP=true k-wasi:; $(MAKE) a N=$@ R=k O='-O3 -target wasm32-wasi -nostdlib -ffreestanding -Dwasm -U__SIZEOF_INT128__ -I/usr/include' STRIP=true CC=clang libk.so:;$(MAKE) a N=$@ R=$@ O='-O3 -march=native -nostdlib -ffreestanding -fPIC -Dshared' L='-shared' STRIP=true ``` Note for Apple M1 users, if your LLVM/Clang version is 15 or greater, you do not need to remove `-march=native`. Support for this feature was added in Clang 15.

FYI: On Apple M1, the pagesize (what you get with the pagesize command or the getpagesize() syscall) is 16384 but setting ZP to that value makes tests fail (more or less) the same way as with 4192. With ZP set to 65336 most tests past with make t. In trying to debug the few failures with ZP set to 65336 I set #define DBG(a...) a and once again almost all the tests fail.

FYI: On Apple M1, the pagesize (what you get with the `pagesize` command or the `getpagesize()` syscall) is 16384 but setting ZP to that value makes tests fail (more or less) the same way as with 4192. With ZP set to 65336 most tests past with `make t`. In trying to debug the few failures with ZP set to 65336 I set `#define DBG(a...) a` and once again almost all the tests fail.
Author
Collaborator
Copy link

I haven't gotten around to actually trying to debug this but as another data point I seem to be able to load files after reading them in with 1:.

I.e. doing a dummy txt:1:"/path/to/file.k" a subsequent \l /path/to/file.k seems to work just fine. It seems to be necessary each time the file changes.

It's as if fetching a file from a cache is slightly different than from disk. I don't know OSX all that well though. I'll try to apprach this more seriously at some point.

I haven't gotten around to actually trying to debug this but as another data point I seem to be able to load files after reading them in with `1:`. I.e. doing a dummy `txt:1:"/path/to/file.k"` a subsequent `\l /path/to/file.k` seems to work just fine. It seems to be necessary each time the file changes. It's as if fetching a file from a cache is slightly different than from disk. I don't know OSX all that well though. I'll try to apprach this more seriously at some point.
Author
Collaborator
Copy link

I'm definitely out of my depth here, but doing a dtruss on a session which first loads the file with 1: shows that the files appear to be mmapped differently.

43713/0x16b039a: open("/Users/~~~~~/K/ngnk/k/l/fmt.k0円", 0x0, 0x0)		 = 3 0
43713/0x16b039a: fstat64(0x3, 0x7FF7B2BCFAA0, 0x0)		 = 0 0
43713/0x16b039a: lseek(0x3, 0x0, 0x2)		 = 1905 0
43713/0x16b039a: mmap(0x0, 0x1771, 0x3, 0x41042, 0xFFFFFFFFFFFFFFFF, 0x0)		 = 0x10D4B2000 0
43713/0x16b039a: mmap(0x10D4B3000, 0x771, 0x3, 0x40052, 0x3, 0x0)		 = 0x10D4B3000 0
43713/0x16b039a: close(0x3)		 = 0 0
...
43713/0x16b039a: open("/Users/~~~~~/K/ngnk/k/l/fmt.k0円", 0x0, 0x0)		 = 3 sigprocmask0
43713/0x16b039a: lseek(0x3, 0x0, 0x2)		 = 1905 kill0
43713/0x16b039a: mmap(0x0, 0x771, 0x3, 0x40042, 0x3, 0x0)		 = 0x10D4B4000 0
43713/0x16b039a: close(0x3)		 = 0 0
43713/0x16b039a: munmap(0x10D4B4000, 0x771)		 = 0 0

The first open appears to be from the 1: call and the second from the \l. In a session where I only did an \l it looks very much like the second version, but crashes shortly thereafter. Perhaps the first call puts it safely in memory first somehow? Also there is no fstat64 with the second call and the mmap calls are different.

Putting this out there in case it rings a bell. I'll keep poking at it.

I'm definitely out of my depth here, but doing a dtruss on a session which first loads the file with `1:` shows that the files appear to be mmapped differently. ``` 43713/0x16b039a: open("/Users/~~~~~/K/ngnk/k/l/fmt.k0円", 0x0, 0x0) = 3 0 43713/0x16b039a: fstat64(0x3, 0x7FF7B2BCFAA0, 0x0) = 0 0 43713/0x16b039a: lseek(0x3, 0x0, 0x2) = 1905 0 43713/0x16b039a: mmap(0x0, 0x1771, 0x3, 0x41042, 0xFFFFFFFFFFFFFFFF, 0x0) = 0x10D4B2000 0 43713/0x16b039a: mmap(0x10D4B3000, 0x771, 0x3, 0x40052, 0x3, 0x0) = 0x10D4B3000 0 43713/0x16b039a: close(0x3) = 0 0 ... 43713/0x16b039a: open("/Users/~~~~~/K/ngnk/k/l/fmt.k0円", 0x0, 0x0) = 3 sigprocmask0 43713/0x16b039a: lseek(0x3, 0x0, 0x2) = 1905 kill0 43713/0x16b039a: mmap(0x0, 0x771, 0x3, 0x40042, 0x3, 0x0) = 0x10D4B4000 0 43713/0x16b039a: close(0x3) = 0 0 43713/0x16b039a: munmap(0x10D4B4000, 0x771) = 0 0 ``` The first open appears to be from the `1:` call and the second from the `\l`. In a session where I only did an `\l` it looks very much like the second version, but crashes shortly thereafter. Perhaps the first call puts it safely in memory first somehow? Also there is no `fstat64` with the second call and the mmap calls are different. Putting this out there in case it rings a bell. I'll keep poking at it.

I had the same error as AlexShroyer above. The pagesize command on my m1 mac returns 16384, and I was able to fix the 0: error by defining PG (previously ZP) like so:

#define PG 16384ll //page
I had the same error as AlexShroyer above. The `pagesize` command on my m1 mac returns `16384`, and I was able to fix the `0:` error by defining PG (previously ZP) like so: ``` #define PG 16384ll //page ```

I used @calherries suggestion and many more tests pass. My clang is still on version 14 but I have gcc-12, so I changed the page size to 16384 and then used make. Tests besides aoc18 seem to mostly pass.

Here's the diff:

diff --git a/a.h b/a.h
index bb3468be..f9fb42f4 100644
--- a/a.h
+++ b/a.h
@@ -24,7 +24,7 @@
 #define S static
 #define SZ sizeof
 #define LEN(x) (SZ(x)/SZ((x)[0]))
-#define PG 4096ll//page
+#define PG 16384ll//page
 #define HD 32ll//header
 #define NI __attribute__((noinline))
 #define SN S NI

Here's how I built:

CC=gcc-12 make

Here's an example1.k file:

a:1 2 3
a+4
$ ./k
\l example1.k
5 6 7

Make a small change, call it example2.k:

a:1 2 3
a+4
0:"hello world"

Run again:

./k
\l example2.k
5 6 7
'io
 0:"hello world"
 ^

Running repl.k in argv works, but now \l does not:

./k repl.k
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 \l example1.k
5 6 7
[1] 29134 bus error ./k repl.k

Similar error for example2.k:

./k repl.k
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 \l example2.k
5 6 7
'io
 0:"hello world"
 ^
[1] 29156 bus error ./k repl.k

Most interestingly, if I load repl.k at the end, it "fixes" it. Here's example3.k:

a:1 2 3
a+4
\l repl.k

This fixes the example1.k bus error from above:

./k repl.k
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info
 \l example3.k
5 6 7
ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info

But if I put 0: in example3.k, the bus error returns.

I used @calherries suggestion and many more tests pass. My clang is still on version 14 but I have gcc-12, so I changed the page size to 16384 and then used `make`. Tests besides `aoc18` seem to mostly pass. Here's the diff: ```diff diff --git a/a.h b/a.h index bb3468be..f9fb42f4 100644 --- a/a.h +++ b/a.h @@ -24,7 +24,7 @@ #define S static #define SZ sizeof #define LEN(x) (SZ(x)/SZ((x)[0])) -#define PG 4096ll//page +#define PG 16384ll//page #define HD 32ll//header #define NI __attribute__((noinline)) #define SN S NI ``` Here's how I built: ```shell CC=gcc-12 make ``` Here's an example1.k file: ``` a:1 2 3 a+4 ``` ``` $ ./k \l example1.k 5 6 7 ``` Make a small change, call it example2.k: ``` a:1 2 3 a+4 0:"hello world" ``` Run again: ``` ./k \l example2.k 5 6 7 'io 0:"hello world" ^ ``` Running repl.k in argv works, but now `\l` does not: ``` ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info \l example1.k 5 6 7 [1] 29134 bus error ./k repl.k ``` Similar error for example2.k: ``` ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info \l example2.k 5 6 7 'io 0:"hello world" ^ [1] 29156 bus error ./k repl.k ``` Most interestingly, if I load repl.k at the end, it "fixes" it. Here's `example3.k`: ``` a:1 2 3 a+4 \l repl.k ``` This fixes the example1.k bus error from above: ``` ./k repl.k ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info \l example3.k 5 6 7 ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \ for more info ``` But if I put `0:` in example3.k, the bus error returns.
Owner
Copy link

i changed #define PG .. to int pg=sysconf(_SC_PAGESIZE)

"one man's constant is another man's variable" - first perlis' epigram :)

(i cant be sure it helps - i dont use macs)

i changed `#define PG `.. to `int pg=sysconf(_SC_PAGESIZE)` "one man's constant is another man's variable" - first perlis' epigram :) (i cant be sure it helps - i dont use macs)

It does help! make CC=gcc-12 passes most tests. Though there seems to be a dependency on having k parent dir in $PATH. The tests that fail:

cp o/k-dflt/bin k
o/t;dy/a.sh;cd g;./a.k;cd -;for i in $(seq 22 -1 15);do aoc/$i/a.sh;done;e/a.sh #test
unit tests
.....
fail:0%0 / -0n
0n
.................................................................................................................................................................................................................................
fail:_("aB3";"X";1.2 -3.0 -4.5 0n) / ("ab3";"x";1 -3 -5 0N)
("ab3";"x";1 -3 -5 0)
..........................................................................................................................................................................................................................................................................................................
fail:0w-0w / -0n
0n
.
fail:0*0w / -0n
0n
............................................................................................................................................................................................................................................................................................................
fail 4/823
It does help! `make CC=gcc-12` passes most tests. Though there seems to be a dependency on having k parent dir in `$PATH`. The tests that fail: ```` cp o/k-dflt/bin k o/t;dy/a.sh;cd g;./a.k;cd -;for i in $(seq 22 -1 15);do aoc/$i/a.sh;done;e/a.sh #test unit tests ..... fail:0%0 / -0n 0n ................................................................................................................................................................................................................................. fail:_("aB3";"X";1.2 -3.0 -4.5 0n) / ("ab3";"x";1 -3 -5 0N) ("ab3";"x";1 -3 -5 0) .......................................................................................................................................................................................................................................................................................................... fail:0w-0w / -0n 0n . fail:0*0w / -0n 0n ............................................................................................................................................................................................................................................................................................................ fail 4/823 ````
Sign in to join this conversation.
No Branch/Tag specified
master
pages
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
7 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ngn/k#30
Reference in a new issue
ngn/k
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?