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

0:"aoc/22/i/06" causes segmentation violation on FreeBSD #72

Closed
opened 2023年12月06日 04:51:01 +01:00 by bakul · 4 comments

This seems to be a long standing problem on FreeBSD. Running 14.0. May be something to with line length?

This seems to be a long standing problem on FreeBSD. Running 14.0. May be something to with line length?
Author
Copy link

I tracked it down to this:

#1 0x000000000023b357 in aV (t=9 '\t', n=4095, v=0x821001000) at m.c:27
27 A aV(C t,U n,O V*v)_(A x=an(n,t);MC(xV,v,(W)n*TW[t]+63>>3);x)

When n-4095, the last arg to memcpy seems to be 4102, but this is too large as a string text is being copied here (which is 4095 bytes long).

I tracked it down to this: ``` #1 0x000000000023b357 in aV (t=9 '\t', n=4095, v=0x821001000) at m.c:27 27 A aV(C t,U n,O V*v)_(A x=an(n,t);MC(xV,v,(W)n*TW[t]+63>>3);x) ``` When n-4095, the last arg to memcpy seems to be 4102, but this is too large as a string text is being copied here (which is 4095 bytes long).
Owner
Copy link

thanks. aoc/22/i/06 works now but there are still other possibly related tests that fail on freebsd, so lets keep this issue open.

thanks. `aoc/22/i/06` works now but there are still other possibly related tests that fail on freebsd, so lets keep this issue open.
Author
Copy link

Thanks. The only other test that currently fails for me is aoc/23/04 but that is due to #!/usr/bin/env k instead of #!../../k

Thanks. The only other test that currently fails for me is aoc/23/04 but that is due to `#!/usr/bin/env k` instead of `#!../../k`
Owner
Copy link

everything should work now

funny, freebsd in virtualbox with 4 (out of 8) cpus runs ≈25% faster than the host debian

everything should work now funny, freebsd in virtualbox with 4 (out of 8) cpus runs ≈25% faster than the host debian
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
2 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#72
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?