profile
viewpoint

fhs/acme-lsp 74

Language Server Protocol tools for the acme text editor

fhs/9upspinfs 9

9P file server for Upspin

fhs/gig 7

[WIP] Git command implemented in pure Go

fhs/duitdraw 2

shiny backend for duit

fhs/edwood 2

Go version of Plan9 Acme Editor

fhs/Ghost 2

GhostText plugin for Acme text editor

fhs/archlinux-packages 1

My packages in archlinux AUR

fhs/CRC32.jl 1

32-bit cyclic redundancy check (CRC-32) checksum implementation for Julia

fhs/ghfs 1

9p GitHub filesystem written in Go for use with Plan 9/p9p

fhs/git9 1

Git implementation for plan 9

issue comment9fans/go

how-to <build> in readme

@mushkevych The makefiles are left over from long ago when Go used to use them. They should be removed (PR #24).

I don't think there is a need to add anything to README. It should already be clear to any Go programmer how to use this package. I suggest studying how to build a Go programs first. See https://golang.org/doc/code.html#ImportingRemote

mushkevych

comment created time in a day

issue comment9fans/go

how-to <build> in readme

If you're trying to build and run acme, this is the wrong repo. You want to install plan9port, which comes with acme and many other Plan 9 tools that run on unix.

mushkevych

comment created time in a day

pull request commentipfs/go-ipfs

fix build on Plan 9

I've updated go-ds-badger to the new version. This PR is ready for review.

fhs

comment created time in 2 days

push eventfhs/go-ipfs

Adin Schmahmann

commit sha a6c15986122a09e545c04da013a5fca2833bf541

docs: update changelog for v0.7.0

view details

Fazlul Shahriar

commit sha cac753bb1834b69709679463047e939040e07607

fix build on Plan 9 Fixes #7575 Fixes #7671

view details

push time in 2 days

PullRequestReviewEvent

pull request commentipfs/go-ipfs

fix build on Plan 9

the badger dep update merged to master, do you need a release of go-ds-badger for this to refer to?

@willscott Yes, I need a new release of go-ds-badger. Thanks.

fhs

comment created time in 2 days

PR opened rjkroege/edwood

Fix plumb client on Plan 9

Mounting the plumber on Plan 9 is not supported by 9fans.net/go. The plumb package reads/writes to /mnt/plumb instead, since the plumber is usually already mounted there.

+83 -43

0 comment

4 changed files

pr created time in 2 days

create barnchfhs/edwood

branch : plan9-look

created branch time in 2 days

startedmischief/9pfs

started time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 9be7380a35ff35c8b915d2211ac480b1a833ef27

Replace Travis CI with a GitHub Action Fixes #293 Fixes #307

view details

push time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 9b2bdc45cacb5ab62e9143185e61477ef0bf50bf

Replace Travis CI with a GitHub Action Fixes #293 Fixes #307

view details

push time in 3 days

pull request commentrjkroege/edwood

Replace Travis CI with a GitHub Action

It now works on windows after I skip the test.

fhs

comment created time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha ac2df5af8f71b12e99155bb12d0887a9e84c7511

Replace Travis CI with a GitHub Action Fixes #293 Fixes #307

view details

push time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 60a36f42b07c08d53178398fd1e7f2bbe28eef33

sanity check

view details

push time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 52ba0d38093d2a581800bf5642708f0e4bd7b0ee

let's try this

view details

push time in 3 days

push eventfhs/edwood

Fazlul Shahriar

commit sha b90437d9a3c12044cb2bda5e50f212008bc3fecd

some new tricks from mvdan

view details

push time in 4 days

create barnchfhs/edwood

branch : gh-action-exp

created branch time in 4 days

pull request commentrjkroege/edwood

Replace Travis CI with a GitHub Action

Works on linux and macos, but the dump file test is failing on windows for some reason: https://github.com/fhs/edwood/runs/1147625923?check_suite_focus=true

fhs

comment created time in 4 days

push eventfhs/edwood

Kyle Nusbaum

commit sha 39b26eb0a448c8f5922641ce3f63981a2f9f576b

edwood: implement "font" ctl message to change font The "font" ctl message accepts an absolute path to a font. If the font exists, the window will use the given font.

view details

Robert Kroeger

commit sha 5549276913f51804858905b6b22aec51021794d8

Support paths into gomod directories. Go mode makes directory names with `@` signs in them. E.g. /Users/rjkroege/tools/gopkg/pkg/mod/github.com/fhs/mux9p@v0.2.0/mux9p.go. Permit Edwood to open these files per #306.

view details

Kyle Nusbaum

commit sha 2fe0549875dde6ad532603babbb594ebeef55047

CONTRIBUTORS: add Kyle Nusbaum

view details

Fazlul Shahriar

commit sha a6ec1341effa196c2daa6beb982bdff06ae1bf10

Replace Travis CI with a GitHub Action Fixes #293 Fixes #307

view details

push time in 4 days

PR opened rjkroege/edwood

Replace Travis CI with a GitHub Action

Fixes #293 Fixes #307

+55 -37

0 comment

2 changed files

pr created time in 4 days

push eventfhs/edwood

Fazlul Shahriar

commit sha ebf3f1068beb960909ca69a6a25ce4b7b544fd3d

Replace Travis CI with a GitHub Action Fixes #293 Fixes #307

view details

push time in 4 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 26f25acf176223f53f1435d4a7a5dd1f82ea6e57

Replace Travis CI with GitHub Action Fixes #293 Fixes #307

view details

push time in 4 days

push eventfhs/edwood

Fazlul Shahriar

commit sha 7a06723e41a99a46f1324f29fe76d29c2b21fd81

fix paths

view details

push time in 4 days

push eventfhs/edwood

Fazlul Shahriar

commit sha cd453792c6fc968faaf1680c776dde9b1a7eede9

yaml blah blah blah

view details

push time in 4 days

push eventfhs/edwood

Fazlul Shahriar

commit sha ede8c80e507e783caa9247155fdb9a1c4435b37f

fix things

view details

push time in 4 days

create barnchfhs/edwood

branch : gh-action

created branch time in 4 days

issue commentrjkroege/edwood

MacOS: attaching to namespace forbidden

Edwood uses 9pserver to listen to the socket, same as p9p acme. Does p9p acme work?

Edwood runs 9pserve -lv /tmp/ns.rjkroege.:0/acme and speaks 9p via its stdin/stdout. The -l flag means it'll write to the log file /tmp/ns.rjkroege.:0/acme.log. What's in the log file?

rjkroege

comment created time in 4 days

starteddanieljamespost/winmux

started time in 4 days

push eventfhs/go-ipfs

Fazlul Shahriar

commit sha b26f868ca92a25cfa47af794b9625ad9a955683e

fix build on Plan 9 Fixes #7575 Fixes #7671

view details

push time in 4 days

PR opened ipfs/go-ipfs

fix build on Plan 9

Fixes #7575 Fixes #7671

https://github.com/ipfs/go-ds-badger/pull/100 should be merged before this PR. I'm using an indirect dependency as a workaround.

+47 -14

0 comment

18 changed files

pr created time in 4 days

create barnchfhs/go-ipfs

branch : plan9

created branch time in 4 days

create barnchfhs/go-ipfs

branch : plan9-pr

created branch time in 4 days

issue commentrjkroege/edwood

crashing on start in big sur

Possibly related to #265?

rjkroege

comment created time in 4 days

Pull request review commentHarvey-OS/harvey

stat for 9P2000.L / devmntn

 struct	Fcall #define	NOFID		(uint32_t)~0U	/* Dummy fid */ #define	IOHDRSZ		24	/* ample room for Twrite/Rread header (iounit) */ +// 9P2000.L, tor some reason, lets callers closely tune what comes from a gettattr.
// 9P2000.L, for some reason, lets callers closely tune what comes from a gettattr.
rminnich

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

created tagfhs/gompd

tagv2.2.0

Client side library for MPD (Music Player Daemon) for Go Programming Language.

created time in 5 days

created tagfhs/gompd

tagv1.0.1

Client side library for MPD (Music Player Daemon) for Go Programming Language.

created time in 5 days

create barnchfhs/gompd

branch : release-v1

created branch time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentHarvey-OS/go

decompress is a simple cmd to decompress lzma files, currently to stdout

+// decompress is a tool for decompressing compressed files++package main++import (+	"flag"+	"fmt"+	"io"+	"log"+	"os"++	"github.com/ulikunitz/xz/lzma"+)++var (+	usage = func() {+		fmt.Fprintf(flag.CommandLine.Output(), "Usage: decompress [file]\n")+		flag.PrintDefaults()+		os.Exit(1)+	}+)++func decompress(infile *os.File, outfile *os.File) error {

for readability, maybe write it like this:

func decompress(infile io.Reader, outfile io.Writer) error {
gmacd

comment created time in 8 days

Pull request review commentHarvey-OS/go

decompress is a simple cmd to decompress lzma files, currently to stdout

+// decompress is a tool for decompressing compressed files+

remove blank line so the package documentation shows up with go doc

gmacd

comment created time in 8 days

PullRequestReviewEvent

push eventfhs/gig

Fazlul Shahriar

commit sha 0510fe0782e4df98904f86e3c3ab7d058fcd1d85

Add Go cross-compilation github workflow

view details

push time in 10 days

Pull request review commentpkg/sftp

Fix build on Plan 9

+// +build !plan9++package sftp++import (+	"os"+	"syscall"+)++const EBADF = syscall.EBADF++func wrapPathError(filepath string, err error) error {+	switch err.(type) {

I agree that an if-statement is better here. It was using a switch in the original code, so I just left it like that.

I've converted it to an if-statement.

fhs

comment created time in 10 days

PullRequestReviewEvent

push eventfhs/sftp

Fazlul Shahriar

commit sha b89e2825a4475b6f50a11a1ade1a5c63d9e08a5d

Replace an one-case switch statement with an if-statement

view details

push time in 10 days

Pull request review commentpkg/sftp

Fix build on Plan 9

 func statusFromError(p ider, err error) sshFxpStatusPacket { 	ret.StatusError.Code = sshFxFailure 	ret.StatusError.msg = err.Error() +	if code, ok := translateSyscallError(err); ok {

Done. Thanks for the review!

fhs

comment created time in 10 days

PullRequestReviewEvent

push eventfhs/sftp

Nicola Murino

commit sha ba3e280524414f347f603a948a5f964c9ac24ec0

request-server: add lstat support Add LstatFileLister, an optional interface for FileLister, if this interface is implemented Lstat requests will call it otherwirse they will be handled in the same way as Stat, as before

view details

Nicola Murino

commit sha ec5b80d98efe8089fc64b9acafabc0af1d1d70b2

Merge pull request #379 from drakkan/lstat request-server: add lstat support

view details

Will Norris

commit sha 28f6fd918711a68c137af64456c5eee5d367d6db

server: use os.IsNotExist to map sshFxNoSuchFile Always use os.IsNotExist to identify any OS specific error types that represent missing files or directories. This resolves an issue on Windows where some system errors (ENOTDIR) were not being identified as 'not found' errors and mapped to sshFxNoSuchFile. fixes #381

view details

Will Norris

commit sha 8df2eb9876cf1bd659f9183f8cad23f387776ac4

server: better handle IsNotExist errors Return early from statusFromError if os.IsNotExist is true.

view details

Cassondra Foesch

commit sha 37434b9e086fed0b66c890f90315dca633c71236

Merge pull request #382 from willnorris/enotdir server: use os.IsNotExist to map sshFxNoSuchFile

view details

Fazlul Shahriar

commit sha bbd5cf27374e71c8c0695154e34e705c1e16405f

Merge branch 'master' into plan9

view details

push time in 10 days

PullRequestReviewEvent

Pull request review commentHarvey-OS/harvey

readdir for 9p2000.L

 mntread(Chan *c, void *buf, int32_t n, int64_t off) 	if (c->buffend > 0) { 		mntrdwr(Twrite, c, c->writebuff, c->buffend, c->writeoffset); 	}--	n = mntrdwr(Tread, c, buf, n, off);+	// Long story.+	// Reads on directories have taken a long path. In the original 45 years ago Unix I cut my teeth on,+	// one could open a file and read it. If it were a directory, data was returned as 14 bytes of name+	// and 2 bytes of inumber.+	// There were obvious problems here, the most basic being that the on-disk format was directly+	// returned to a program. Hence readdir, which was an attempt at an abstraction: it returned+	// the names and little else. So what happens in, say, ls -l? it looks something like this:+	// entries := readdir()+	// for each entry, stat() the entry.+	// Now it was well known in the 1980s that this is a disaster on a network: there is at+	// least one packet for each directory entry.+	// For directory reads, it's much, much better to grow the amount+	// of data in a packet, even data not used, than to add lots of packets when more+	// info is needed. Measurement has shown this over and over. Hence NFS3 READDIRPLUS.+	// Plan 9 and 9P, circa 1991, introduced a major improvement:+	// directories are like files, and one can now read them again. This is really important:+	// o means you can import a directory over 9p and just read from it+	// o removes a need for a readdir system call+	// o avoids a special op in 9p to read directories+	// o no need to have the kernel unpack the information, just relay to user space+	// Were readdir brought into 9P, the adddition would impact 9P, the kernel, all user+	// libraries, and all user programs, in not very good ways.+	// This is one of the subtle design elements of Plan 9 that not even many Plan 9 users+	// think about.+	// Directory reads return stat records, which are an endian- and word-length independent+	// representation of the file metadata.+	// 9p supports this kind of read directly.+	// A read of a directory on Plan 9 returns metadata, in other words, so there are no+	// extra stats per entry as in the Unix model.+	// Unix and Linux, sadly, retained the old model. A Linux readdir returns dirents.+	// If you want to know more, stat each entry. We're back to the bad old days.+	// What's this look like on 9P?+	// 1. read the dir+	// 2. for each element, walk to it.+	// 3. stat it.+	// 9P2000.L had a chance to fix this in a way that would have worked well for Plan 9+	// as well as some hypothetical future Linux with a more powerful readdir model,+	// but sadly it instead baked in those limitations.+	// We don't want to reflect that mess to user mode in Harvey, so we have to+	// convert the 9P2000.L information to plan 9 stat structs, losing information+	// in the process.+	// 9P2000.L stat information looks like this:+	// qid[13] offset[8] type[1] name[s]+	//+	// Plan 9 stat looks like this:+	//+	// size[2]    total byte count of the following data+	// type[2]    for kernel use+	// dev[4]     for kernel use+	// qid.type[1] the type of the file (directory, etc.), represented as a bit vector corresponding to the high 8 bits of the file's mode word.+	// qid.vers[4] version number for given path+	// qid.path[8] the file server's unique identification for the file+	// mode[4]   permissions and flags+	// atime[4]   last access time+	// mtime[4]   last modification time+	// length[8]   length of file in bytes+	// name[ s ]   file name; must be / if the file is the root directory of the server+	// uid[ s ]    owner name+	// gid[ s ]    group name+	// muid[ s ]   name of the user who last modified the file+	//+	// Important point here: note that in 9P2000.L, they had to add a stat structure.+	// There is no such thing needed in 9P2000; it's the province of the kernel, not+	// the protocol. Hopefully this illustrates the differences in the model.+	//+	// The size of a 9P stat struct is:+	// ../../../include/fcall.h:#define STATFIXLEN     (BIT16SZ+QIDSZ+5*BIT16SZ+4*BIT32SZ+1*BIT64SZ)    amount of fixed length data in a stat buffer */+	//	size + qidsz + what is that 5? type and 4 sizes for strings + dev,mod,atime,mtime + length+	// Note that for now we can only fill in the name; to better fill this in we'll need to do the+	// walk/stat operation.++	// Rough algorithm:+	// zero buf. Useful so that the default length strings for uid, gid, muid will be emtpy.
	// zero buf. Useful so that the default length strings for uid, gid, muid will be empty.
rminnich

comment created time in 11 days

Pull request review commentHarvey-OS/harvey

readdir for 9p2000.L

 mntread(Chan *c, void *buf, int32_t n, int64_t off) 	if (c->buffend > 0) { 		mntrdwr(Twrite, c, c->writebuff, c->buffend, c->writeoffset); 	}--	n = mntrdwr(Tread, c, buf, n, off);+	// Long story.+	// Reads on directories have taken a long path. In the original 45 years ago Unix I cut my teeth on,+	// one could open a file and read it. If it were a directory, data was returned as 14 bytes of name+	// and 2 bytes of inumber.+	// There were obvious problems here, the most basic being that the on-disk format was directly+	// returned to a program. Hence readdir, which was an attempt at an abstraction: it returned+	// the names and little else. So what happens in, say, ls -l? it looks something like this:+	// entries := readdir()+	// for each entry, stat() the entry.+	// Now it was well known in the 1980s that this is a disaster on a network: there is at+	// least one packet for each directory entry.+	// For directory reads, it's much, much better to grow the amount+	// of data in a packet, even data not used, than to add lots of packets when more+	// info is needed. Measurement has shown this over and over. Hence NFS3 READDIRPLUS.+	// Plan 9 and 9P, circa 1991, introduced a major improvement:+	// directories are like files, and one can now read them again. This is really important:+	// o means you can import a directory over 9p and just read from it+	// o removes a need for a readdir system call+	// o avoids a special op in 9p to read directories+	// o no need to have the kernel unpack the information, just relay to user space+	// Were readdir brought into 9P, the adddition would impact 9P, the kernel, all user
	// Were readdir brought into 9P, the addition would impact 9P, the kernel, all user
rminnich

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpkg/sftp

Fix build on Plan 9

 func statusFromError(p ider, err error) sshFxpStatusPacket { 	ret.StatusError.Code = sshFxFailure 	ret.StatusError.msg = err.Error() +	if code, ok := translateSyscallError(err); ok {

We still need syscall error code handing for the case when errno == 0 (we return sshFxOk), and when errno is non-zero but not ENOENT or EPERM, in which case we return sshFxFailure.

I'm inclined to leave this change out of this PR, since we're just trying to fix build on plan9 (and not break other systems in the process).

fhs

comment created time in 11 days

Pull request review commentpkg/sftp

Fix build on Plan 9

+// +build !plan9

Done

fhs

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventfhs/sftp

Fazlul Shahriar

commit sha 5a6519c8a7539d2325c747fccb9da1be71d3b6f2

Rename stat_unix.go to stat_posix.go

view details

push time in 11 days

Pull request review commentpkg/sftp

Fix build on Plan 9

 func statusFromError(p ider, err error) sshFxpStatusPacket { 	ret.StatusError.Code = sshFxFailure 	ret.StatusError.msg = err.Error() +	if code, ok := translateSyscallError(err); ok {

Yeah, it's better to use os.IsNotExist and os.Permission here. I was trying to keep the changes to minimum, but I can certainly make that change.

fhs

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentpkg/sftp

Fix build on Plan 9

+// +build !plan9

I'll use _posix.go because that's what the standard library uses.

fhs

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentpkg/sftp

Fix build on Plan 9

 func marshalFileInfo(b []byte, fi os.FileInfo) []byte {  	return b }--// toFileMode converts sftp filemode bits to the os.FileMode specification-func toFileMode(mode uint32) os.FileMode {-	var fm = os.FileMode(mode & 0777)-	switch mode & S_IFMT {-	case syscall.S_IFBLK:-		fm |= os.ModeDevice-	case syscall.S_IFCHR:-		fm |= os.ModeDevice | os.ModeCharDevice-	case syscall.S_IFDIR:-		fm |= os.ModeDir-	case syscall.S_IFIFO:-		fm |= os.ModeNamedPipe-	case syscall.S_IFLNK:-		fm |= os.ModeSymlink-	case syscall.S_IFREG:-		// nothing to do-	case syscall.S_IFSOCK:-		fm |= os.ModeSocket-	}-	if mode&syscall.S_ISGID != 0 {

The syscall package is not meant to be portable. It's actually currently frozen, so I think don't we can add S_ISGID for plan9 even if we wanted to. In fact, the syscall package might be removed in the furture in favor of golang.org/x/sys.

fhs

comment created time in 11 days

PullRequestReviewEvent

pull request commentipfs/go-ds-badger

build(deps): bump github.com/dgraph-io/badger from 1.6.1 to 1.6.2

Note: we need this for https://github.com/ipfs/go-ipfs/issues/7575

dependabot-preview[bot]

comment created time in 11 days

create barnchfhs/wireguard-go

branch : plan9

created branch time in 12 days

fork fhs/wireguard-go

Mirror only. Official repository is at https://git.zx2c4.com/wireguard-go

fork in 12 days

delete branch fhs/harvey

delete branch : sysmount-dc

delete time in 12 days

push eventHarvey-OS/harvey

Fazlul Shahriar

commit sha 24c9ad670012b7d5699784273db67324224f3683

Fix crash in mount syscall when dc is 0 (#1000) When dc is 0, we try to do a bind, but since the `name` argument is nil, we crash with `invalid address`. The fix returns an error instead. To fix this for old plan9 programs that doesn't know about dc, create a backward compatible mount_ syscall. Fixes #998 Signed-off-by: Fazlul Shahriar <fshahriar@gmail.com>

view details

push time in 12 days

PR merged Harvey-OS/harvey

Fix crash in mount syscall when dc is 0

When dc is 0, we try to do a bind, but since the name argument is nil, we crash with invalid address. The fix falls back to 'M' in this case, which also helps plan9 programs that doesn't know about dc.

Fixes #998

Signed-off-by: Fazlul Shahriar fshahriar@gmail.com

+45 -3

2 comments

2 changed files

fhs

pr closed time in 12 days

issue closedHarvey-OS/harvey

syscall.Mount crashes in Go

Steps to reproduce

Build this program in unix and run in harvey:

package main
import "syscall"
func main() {
	if err := syscall.Mount(0, 0, "", 0, ""); err != nil {
		println(err.Error())
	}
}

To build: GOOS=plan9 go build mount.go

Expected behavior

Program should print an error. On 9front:

cpu% ./mount
inappropriate use of fd

Actual behavior

Program crashes:

cpu% ./mount
mount 1063: suicide: invalid address 0x0/1 in sys call pc=0x25d980

closed time in 12 days

fhs

startedhenesy/awesome-plan9

started time in 13 days

Pull request review commentHarvey-OS/harvey

Fix crash in mount syscall when dc is 0

 sysmount(Ar0* ar0, ...) 	dc = va_arg(list, int); 	va_end(list); +	if(dc == 0){

Changed it to an error.

fhs

comment created time in 13 days

PullRequestReviewEvent

push eventfhs/harvey

Fazlul Shahriar

commit sha 44e9ba7413f6bb802e2aa2de0b4fd9e4d9b0bb4c

Fix crash in mount syscall when dc is 0 When dc is 0, we try to do a bind, but since the `name` argument is nil, we crash with `invalid address`. The fix returns an error instead. To fix this for old plan9 programs that doesn't know about dc, create a backward compatible mount_ syscall. Fixes #998 Signed-off-by: Fazlul Shahriar <fshahriar@gmail.com>

view details

push time in 13 days

pull request commentHarvey-OS/harvey

Fix crash in mount syscall when dc is 0

Added mount_ syscall.

fhs

comment created time in 13 days

push eventfhs/harvey

Fazlul Shahriar

commit sha efadd60aa31bd3e9368ad811f5d9bd0fcac60a37

Fix crash in mount syscall when dc is 0 When dc is 0, we try to do a bind, but since the `name` argument is nil, we crash with `invalid address`. The fix falls back to 'M' in this case. To fix this for old plan9 programs that doesn't know about dc, create a backward compatible mount_ syscall. Fixes #998 Signed-off-by: Fazlul Shahriar <fshahriar@gmail.com>

view details

push time in 13 days

pull request commentHarvey-OS/harvey

Fix crash in mount syscall when dc is 0

My only worry centers on when dc is garbage with old programs that don't have this new API?

That is a concern. I think a new syscall should be added.

fhs

comment created time in 13 days

PR opened Harvey-OS/harvey

Fix crash in mount syscall when dc is 0

When dc is 0, we try to do a bind, but since the name argument is nil, we crash with invalid address. The fix falls back to 'M' in this case, which also helps plan9 programs that doesn't know about dc.

Fixes #998

Signed-off-by: Fazlul Shahriar fshahriar@gmail.com

+5 -2

0 comment

1 changed file

pr created time in 14 days

create barnchfhs/harvey

branch : sysmount-dc

created branch time in 14 days

issue commentHarvey-OS/harvey

nil pointer in Go doesn't generate a panic

It seems to be crashing when trying to access the stack within the signal handler. sp has address 0x23 here: https://github.com/golang/go/blob/go1.15.2/src/runtime/os3_plan9.go#L74

fhs

comment created time in 14 days

issue openedHarvey-OS/harvey

nil pointer in Go doesn't generate a panic

Steps to reproduce

Run this program in harvey:

package main

func main() {
	var p *int
	println(*p)
}

Built on linux using Go 1.15.2: GOOS=plan9 go build nil.go

Expected behavior

It should generate a go panic. On 9front:

cpu% ./nil
panic: runtime error: invalid memory address or nil pointer dereference
[signal sys: trap: fault read code=0x0 addr=0x0 pc=0x258d44]

goroutine 1 [running]:
main.main()
	/home/fhs/tmp/nil.go:5 +0x24

Actual behavior

cpu% ./nil
nil 173: suicide: sys: trap: fault read addr=0x23 pc=0x2295cf

created time in 15 days

issue openedHarvey-OS/harvey

syscall.Mount crashes in Go

Steps to reproduce

Build this program in unix and run in harvey:

package main
import "syscall"
func main() {
	if err := syscall.Mount(0, 0, "", 0, ""); err != nil {
		println(err.Error())
	}
}

To build: GOOS=plan9 go build mount.go

Expected behavior

Program should print an error. On 9front:

cpu% ./mount
inappropriate use of fd

Actual behavior

Program crashes:

cpu% ./mount
mount 1063: suicide: invalid address 0x0/1 in sys call pc=0x25d980

created time in 15 days

PR opened pkg/sftp

Fix build on Plan 9

All test are passing on Plan 9, and I've also verified examples/go-sftp-server is working.

+272 -117

0 comment

16 changed files

pr created time in 15 days

create barnchfhs/sftp

branch : plan9

created branch time in 15 days

fork fhs/sftp

SFTP support for the go.crypto/ssh package

fork in 15 days

Pull request review commentHarvey-OS/harvey

Support basic open/read/close/clunk for 9P2000.L files

+/*+ * This file is part of the UCB release of Plan 9. It is subject to the license+ * terms in the LICENSE file found in the top-level directory of this+ * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No+ * part of the UCB release of Plan 9, including this file, may be copied,+ * modified, propagated, or distributed except according to the terms contained+ * in the LICENSE file.+ */++#include <u.h>+#include <libc.h>++static char *errors[] = {+	[1] = "operation not permitted",+	[2] = "no such file or directory",

What system are these error strings from? Maybe we should match them to what Go expects on Plan 9:

$ go doc -all syscall | grep ENOENT
	ENOENT          = Errno(0x2)
$ GOOS=plan9 go doc -all syscall | grep ENOENT
	ENOENT       = NewError("file does not exist")
rminnich

comment created time in 16 days

PullRequestReviewEvent

push eventfhs/mmap-go

Fazlul Shahriar

commit sha 527975f8528970664dbd045020b7bf7b50ebd182

Fix build on Plan 9 Plan 9 doesn't have mmap, but this package may be used by a Go program that still works without mmap.

view details

push time in 16 days

PR opened edsrzf/mmap-go

Fix build on Plan 9
+27 -0

0 comment

1 changed file

pr created time in 16 days

create barnchfhs/mmap-go

branch : plan9

created branch time in 16 days

fork fhs/mmap-go

A portable mmap package for Go

fork in 16 days

startedtailscale/depaware

started time in 16 days

GollumEvent
more