summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-16LibCore+Userland: Convert TCPServer to use the Serenity Stream APIsin-ack
This is intended as a real-usecase test of the Serenity Stream API, and seemed like a good candidate due to its low amount of users.
2021-12-16Tests: Implement tests for the Serenity Stream APIsin-ack
2021-12-16LibCore: Implement the Serenity Stream API classessin-ack
The Serenity Stream API is the name for the new set of classes intended to replace IODevice and its descendants. It provides more flexibility for subclasses by allowing each subclass to override all the possible functionalities according to their wishes. Stream is the base class which implements majority of the functionality expected from a readable and writable stream. SeekableStream adds seeking on top, and provides a couple utility methods which derive from seek. Socket adds a couple of BSD socket utility functions such as checking whether there is data available to read and checking the pending bytes on the socket. As for the concrete classes, there is File which is a SeekableStream and is intended to operate on file-like objects; and TCPSocket, UDPSocket and LocalSocket, which handle TCP, UDP and UNIX sockets respectively. The concrete classes do not do buffering by default. For buffering functionality, a set of augmentative classes named BufferedSeekable and BufferedSocket have been implemented, intended to wrap a SeekableStream and a Socket, respectively.
2021-12-16Kernel+LibC: Move errno definitions to Kernel/API/POSIXsin-ack
This fixes at least half of our LibC includes in the kernel. The source of truth for errno codes and their description strings now lives in Kernel/API/POSIX/errno.h as an enumeration, which LibC includes.
2021-12-16LibCore+LookupServer: Implement and use UDPServer::sendsin-ack
2021-12-16Kernel: Return the correct result for FIONREAD on datagram socketssin-ack
Before this commit, we only checked the receive buffer on the socket, which is unused on datagram streams. Now we return the actual size of the datagram without the protocol headers, which required the protocol to tell us what the size of the payload is.
2021-12-16AK: Use __builtin_memmove for ByteBuffer and Span's overwritesin-ack
__builtin_memcpy will fail when the target area and the source area overlap. Using __builtin_memmove will handle this case as well.
2021-12-16LibC: Implement serenity_opensin-ack
This syscall is very much similar to open(2), with the difference of accepting a string and a length, instead of requiring a null-terminated string. This way, if the string passed is not null-terminated, we can still perform the syscall.
2021-12-16LibGfx: Handle malformed Platform ID during TTF parsingBrian Gianforcaro
This should fix one of the OSS Fuzz crashes that occurs during TTF file format parsing. See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37263
2021-12-16Terminal: Fix broken selection after dbl/trp clickryanb-dev
This commit resets the terminal triple click timer when appropriate.
2021-12-16Toolchain: Update BuildQemu.sh to qemu-6.2Brian Gianforcaro
QEMU 6.2 was released on December 14th. Release Notes: https://wiki.qemu.org/ChangeLog/6.2
2021-12-16expr: Use StringView literals more (instead of raw C strings)Kenneth Myhra
2021-12-16expr: Port to LibMainKenneth Myhra
2021-12-16functrace: Port to LibMain and move away from raw C stringsKenneth Myhra
Ports to LibMain and uses StringView more (rather than raw C strings).
2021-12-16flock: Port to LibMainKenneth Myhra
2021-12-16LibCore: Add waitpid() wrapper that return ErrorOr<pid_t>Kenneth Myhra
2021-12-16LibCore: Add posix_spawnp() wrapper that return ErrorOr<pid_t>Kenneth Myhra
2021-12-16file: Port to LibMainKenneth Myhra
2021-12-16fdtdump: Port to LibMainKenneth Myhra
2021-12-16dirname: Port to LibMainKenneth Myhra
2021-12-16diff: Port to LibMainKenneth Myhra
2021-12-16df: Port to LibMainKenneth Myhra
2021-12-16ddate: Port to LibMainKenneth Myhra
2021-12-16AK+Tests: Use less space in ErrorOrBen Wiederhake
2021-12-15AK: Enable fast path for removal by hash-compatible key in HashMap/TableHendiadyoin1
2021-12-15AK: Add implied const qualifiers to the Json interfaceHendiadyoin1
As specified by clang-tidy.
2021-12-15AK: Use StringView as key-type when removing a Value from an JsonObjectHendiadyoin1
2021-12-15AK: Return `bool` in `JsonValue::as_bool()`Hendiadyoin1
2021-12-15Kernel: Collapse blocking logic for exclusive Mutex' restore_lock()Hendiadyoin1
Clang-tidy pointed out that the `need_to_block = true;` block was duplicate, and if we collapse these if statements, we should do so fully.
2021-12-15Kernel: Add implied auto-specifiers in LockingHendiadyoin1
As per clang-tidy.
2021-12-15Kernel: Add missing includes in LockingHendiadyoin1
2021-12-15Kernel: Remove duplicate access specifier in DevTmpFSInodeHendiadyoin1
As per clang-tidy.
2021-12-15Kernel: Remove else statements after return in Plan9FileSystem.cppHendiadyoin1
As per clang-tidy.
2021-12-15Kernel: Add implied auto-specifiers in FileSystemHendiadyoin1
As per clang-tidy.
2021-12-15Kernel: Fix missing include in FileSystem/Mount.hHendiadyoin1
2021-12-16Shell: Don't skip over the first brace expansion entry if it's emptyAli Mohammad Pur
Previously we were simply ignoring the empty entry in '{,x}', making it resolve to a list with a single element '(x)', this commit makes that work as expected and resolve to '("" x)'.
2021-12-16Shell: Set subshell flag after checking for its value in parent shellAli Mohammad Pur
This also reverts commit 07cc7eed295a29afef37c4bfaabaf57a3f4af0c1, as that attempted to fix the issue this caused (and succeeded...but it broke something else on linux).
2021-12-16LibLine: Switch all files to use east-constAli Mohammad Pur
2021-12-16LibLine: Update the prompt origin after resize + suggestion redisplayAli Mohammad Pur
2021-12-16LibLine: Take the prompt into account when adjusting for a scrolled viewAli Mohammad Pur
Otherwise we'd end up putting the prompt *after* the previous prompt instead of *over* it when showing suggestions that span more lines than are available without scrolling.
2021-12-16Spreadsheet: Handle emptying of cell containing only an '='RasmusNylander
Cell::set_data(String new_data) now checks whether the cell is a formula-cell and the new_data is an empty string. If this is case, it will no longer simply return and will now instead actually set the cell's contents to an empty string. This fixes an error whereupon committing the string "=" to a cell, it would not be possible to directly delete the cell's contents. Instead, it first had to be overwritten with another string, which then could be deleted. This could probably be done more elegantly. Right now, I believe, writing the string "=" to a (formula-)cell already containing an identical string will result in the cell being marked as dirty, even though nothing actually changed.
2021-12-15Lagom: Add argument `WORKING_DIRECTORY` to `lagom_test(...)`Simon Woertz
So far the working directory was set in some cases using `set_tests_properties(...)`, but this requires to know which name is picked by `lagom_test(...)` when calling `add_test(...)`. In case of adding multiple test cases using a globbing pattern this would require to duplicate code to construct the test name from the file name.
2021-12-15LibSanitizer: Log UBSAN errors in red text to the debug consoleAndrew Kaster
This makes them harder to miss for spammy apps when UBSAN is not deadly. Don't commit to making the warnln red at the momment, because that would probably be a nuisance if stderr is not a tty.
2021-12-15AK+LibSanitizer: Add method to zero out a UBSAN SourceLocationAndrew Kaster
This is the same strategy that LLVM's compiler-rt uses to make sure that each UBSAN error is only reported once, when UBSAN is *not* deadly. Otherwise, each time we head through a UB codepath, we will log the same error over and over. That behavior just adds noise to the logs and makes it nearly impossible to run binaires that have some common code path with flagged UB in them. compiler-rt goes the extra step to make sure the "clear" action is atomic, but we don't really have that many multi-threaded apps gettting tested with UBSAN yet, so we can add that later.
2021-12-15LibSanitizer: Check for halt_on_error=0 in $UBSAN_OPTIONSAndrew Kaster
This allows a developer to set the g_ubsan_is_deadly flag to true by default and still disable UBSAN for certain applications.
2021-12-15LibDebug: Handle DWARF 4 address rangesDaniel Bertalan
The format of the address range section is different between DWARF version 4 and version 5. This meant that we parsed programs compiled with `-gdwarf-4` incorrectly.
2021-12-15LibDebug: Fix truncation in ExtendedOpcodes::SetDiscriminatorDaniel Bertalan
The parameter of this operator is an unsigned LEB128 integer, so it can be more than 1 byte in length. If we only read 1 byte, we might mess up the offsets for the instructions following it.
2021-12-15Base: Add some Mongolian characters to font Katica Regular 10Lady Gegga
1801-180A, 1820, 1821, 1830-1833, 1841-1843, 1850-1852, 1860-1862, 1880-1884 https://www.unicode.org/charts/PDF/U1800.pdf
2021-12-15LibRegex: Merge alternations based on blocks and not instructionsAli Mohammad Pur
The instructions can have dependencies (e.g. Repeat), so only unify equal blocks instead of consecutive instructions. Fixes #11247. Also adds the minimal test case(s) from that issue.
2021-12-15LibUnicode: Compile generated sources optimized for sizeTimothy Flynn
This breaks LibUnicode into two libraries: LibUnicode containing the public APIs for accessing the library, and LibUnicodeData containing the generated source files. LibUnicodeData has compile options optimized for size, which save about 1MB of data in total.