summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-23nusb/lib: use fmtprint for the entire dump to be printed outSigrid
2020-08-23kernel: fix Abind cyclic reference and mounthead leaks (thanks Alex Musolino)cinap_lenrek
The Abind case in namec() needs to cunique() the chan before attaching the umh mount head pointer onto it. This is because we cannot give a reference to the mount head to any of the mh->mount...->to channels, as they will never go away until the mount head goes away. This is a cyclic reference. This could be reproduced with: @{rfork n; mount -a '#s/boot' /mnt/root; bind /mnt/root /} Also, fix memory leaks around cunique(), which can error, leaking the mount head we got from domount(). Move the umh != nil check inside cunique().
2020-08-21torrent(1): update url in examples sectionAlex Musolino
2020-08-20ip(3): fix typo in manpage (thanks jstsmthrgk)Ori Bernstein
2020-08-20libaml: fix fault when the second operand of comparison cannot be convertedSigrid
2020-08-18oggdec: give it enough chance to seek from the start, where first seek might ↵Sigrid
be still too close to the beginning of the file
2020-08-12audio/oggdec: allow -s 0Sigrid
2020-08-12audio/mp3dec: mad timer duration is all wrong, use samples insteadSigrid
2020-08-12audio/mp3dec: add -s SECONDS optionSigrid
2020-08-11audio(1): add new -s SECONDS optionSigrid
2020-08-11audio/oggdec: add -s SECONDS option to seek before decodingSigrid
2020-08-11audio/flacdec: add -s SECONDS option to seek before decodingSigrid
2020-08-10tmdate(2): fix typo (thanks mveety)Ori Bernstein
sysfata => sysfatal
2020-08-10stdio.h: correct return type of putcOri Bernstein
The putc macro is specified as returning an int, but our type conversion rules turned it into a uint. Put in the appropriate cast to make the type what we want.
2020-08-10aux/ms2, aux/na: fix warningsOri Bernstein
aux/na was comparing the return of putc with <0, when it should have been comparing against EOF, which is not specified as -ve. aux/ms2 was zero-extending the mask for the address when it should have been sign extended.
2020-08-10seconds: use new libc date apiOri Bernstein
2020-08-10date: use new libc date apis.Ori Bernstein
2020-08-10mergeOri Bernstein
2020-08-10vmx: does not do well with certain fb widths, so restrict itSigrid
2020-08-09upas/fs: port date parsing to libc apisOri Bernstein
There was a lot of code in upas/fs to deal with dates. Now there isn't.
2020-08-09ip/httpd: fix 'mk nuke'Ori Bernstein
2020-08-09libc: new date apisOri Bernstein
The current date and time APIs on Plan 9 are not good. They're inflexible, non-threadsafe, and don't expose timezone information. This commit adds new time APIs that allow parsing arbitrary dates, work from multiple threads, and can handle timezones effectively.
2020-08-08cc: promote integer constants according to c99 spec.Ori Bernstein
C99 integer constants with no type suffix promote differently depending on the way that they're written: hex and oct consts promote as int => uint => long => ulong => vlong => uvlong. Decimal constants are always signed. We used to promote all values to uint on overflow, and never went wider. This change fixes that, and adds a warning when a decimal constant that would have been promoted to uint in the past gets promoted to int.
2020-08-08ndb/dns: allow multiple txt, nullrr, cert, key and sig records (thanks kvik)cinap_lenrek
The de-duplication of txt, nullrr, cert, key and sig records reduced all records to a single one. Also, dblookup1() missed the txt record case and did not return a unique list of rr's. Now we consider these records unique if their value is different. The new txtequiv() function does that for TXT records, which is a bit tricky as it needs to take different segmentation into account.
2020-08-07vmx: set xstart to either nsec or cycles depending on what is availableSigrid
2020-08-07bullshit: decentralized ActivityPubSigrid
2020-08-05libttf: fix cmap subtable offset type and rank UCS-4 higher (more ↵Sigrid
codepoints). fixes runes > 0xffff
2020-08-04kernel: don't strip binaries in bootfs.paqcinap_lenrek
2020-08-04qball: remove unused #include <stdio.h>cinap_lenrek
2020-08-04devmnt: print chanpath for unexpected reply tagcinap_lenrek
2020-08-04rc: avoid stat calls for directory globbingcinap_lenrek
On Plan9, we can count on Readdir() onlydirs argument to work, which allows us to avoid stating every single file to see if it is a directory.
2020-08-04libttf: check directory() resultSigrid
2020-08-047c: now really fix OASxxx operationscinap_lenrek
the previous patch broke 64-bit ops as the type for the operation is determined from the first argument to gopcode() (nod1.type), not the type the result (nod.type). so we need to include the conversion of nod1 type to the type of nod.
2020-08-03mergecinap_lenrek
2020-08-03reverting 7c change, breaks some 64-bit shifts...cinap_lenrek
2020-08-03mergecinap_lenrek
2020-08-03acme: reverting scroll change, causes continuous scrolling with scrollwheelcinap_lenrek
2020-08-027c: fix wrong type on OASxxx operationscinap_lenrek
the bug can be reproduced with the following test case: #include <u.h> #include <libc.h> void main() { int size = 1; size*=1.5; exits(0); } this produces the following assembly: TEXT main+0(SB),0,$16 MOVW $1,R1 FCVTZSDW $1.50000000000000000e+00,R2 <- tries to convert rhs to int?? MULW R2,R1,R2 <- multiplication done in int? bug! MOV $0,R0 BL ,exits+0(SB) RETURN , END , the confusion comes from the *= operation using the wrong type for the multiplication. in this case we should use the float type of the rhs, do the operation, and then convert the result back to int type of the lhs. this change ports the same logic from 5c's getasop().
2020-08-02rc-httpd: fix invalid test(1) invocation in dir-indexAlex Musolino
2020-08-01deroff: fix out-of-bounds access if runes above 0X80 are inside EQ clauses ↵Ori Bernstein
(thanks mmnmnnmnmm, via plan9port) Characters greater than 0X80 will cause a read beyond the bounds of the array chars[]. For particular unicode characters this can cause deroff to segfault. A minimal example: $ deroff .EQ u∈ Segmentation fault Throughout deroff, charclass() is used instead of directly indexing chars[] so I presume this was just missed.
2020-08-01htmlroff: fix out of bounds access (thanks Rei-sen, via plan9port)Ori Bernstein
_readx() uses rune count as its argument and not size, so we should pass nelem() instead of sizeof().
2020-08-01mk9660(8): fix reference to proto file formatkvik
2020-08-01pre-lib9p servers: fix incorrect Tversion handlingkvik
version(5) says: If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters ``unknown''. Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror. lib9p(2) follows the above spec, although ignoring the next part concerning comparison after period-stripping. It assumes an Fcall.version starting with "9P" is correctly formed and returns the only supported version of the protocol, which seems alright. This patch brings pre-lib9p servers in accordance with the spec.
2020-08-01vmx(1): use _tos->cyclefreq (thanks cinap)Sigrid
2020-07-31dc: increase exponent limit (thanks unboe, lyndon)Ori Bernstein
dc has an arbitrary limit on the size of the exponent. Lets replace it with a different arbitrary limit.
2020-07-31vmx(1): add missing fileSigrid
2020-07-31vmx(1): use cycles() instead of nsec() when possibleSigrid
this provides better timing and reduced number of syscalls (~2.7M old vs ~35K new in a test)
2020-07-31vmx: use _actual_ system kbmapSigrid
2020-07-30aux/acpi: forgot to commit -p optionSigrid
2020-07-30aux/acpi: write a man page, fix usage, call threadexitsSigrid