Commit graph

61857 commits

Author SHA1 Message Date
Tim Ledbetter 4091d7fc05 SystemMonitor: Add an action to pause updates 2024-06-23 21:20:37 +01:00
Liav A. 5cb1d2a63e Utilities/pkg: Move ports database handling from AvailablePort{.h,.cpp}
Instead, let's create a new class called AvailablePortDatabase that will
handle updating (from the Internet, by using our repository) of the list
and instantiating an object that could be used for querying.
2024-06-23 00:59:54 +02:00
Liav A. 1e13d758a2 Utilities/pkg: Move ports database handling from InstalledPort{.h,.cpp}
Instead, let's create a new class called InstalledPortDatabase that will
handle reading, and adding new entries as needed to such database.
2024-06-23 00:59:54 +02:00
Liav A. b201a91e72 Utilities/pkg: Rename ports_database => default_ports_database_path 2024-06-23 00:59:54 +02:00
Daniel Bertalan 8b189b7eb0 Fuzzers: Use libc++ on OSS-Fuzz for Lagom code generators
By unsetting `CXXFLAGS` in order to build Lagom code generators without
instrumentation, we were also removing `-stdlib=libc++`, so Clang ended
up using the runner image's libstdc++ 9 headers. These are too old, and
don't contain `<coroutine>`, leading to a build failure.

Fixes #24578
2024-06-22 20:44:13 +02:00
Ali Mohammad Pur a711bb63b7 LibHTTP+LibCore+RequestServer: Use async streams for HTTP
We no longer use blocking reads and writes, yielding a nice performance
boost and a significantly cleaner (and more readable) implementation :^)
2024-06-19 15:45:02 +02:00
Ali Mohammad Pur be2bf055dd LibCore: Fix some thread-related memory/object leaks 2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 1c31dbd110 LibJS: Make emsdk's clang happy 2024-06-19 15:45:02 +02:00
Ali Mohammad Pur fe3cdda2eb Contrib/VideoPlayerSDL: Disable on emscripten 2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 8c0b13a60a Meta: Update CI emsdk to latest 2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 9f4f319277 RequestServer+LibCore+LibTLS: Use coroutines for socket connection
This allows RS to start connections in parallel without actively waiting
for any possible handshakes.
Doing so gives us a nearly-3x speedup on the average connection latency.
2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 30c41835e6 LibIPC: Actually yield to the event loop when EMSGSIZE or EAGAIN
Previously this just yielded the time slice, which blocked the event
loop until the other side read some data from the socket.
This "fixed" impl is still equally bad, but at least it doesn't block
the event loop.
2024-06-19 15:45:02 +02:00
Ali Mohammad Pur ba54c9adb2 LibCore: Add a couple coroutine-related helper functions 2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 6edf5653a5 AK: Add a formatter for OwnPtr<T>
This formatter just prints the object out as a pointer.
2024-06-19 15:45:02 +02:00
Ali Mohammad Pur 8691d1b885 LibCrypto: Milk some more performance out of galois_multiply()
This simple change makes AES-GCM 5% faster :^)
2024-06-19 15:45:02 +02:00
Ali Mohammad Pur ea15ccdae3 LibCrypto: Remove select individual Vector/Span::at() calls
These were showing up on profiles as quite hot (>5%), we can avoid all
the unnecessary assertions by doing them once in advance and using
pointers for the rest of the function.
This makes AES-GCM about 6% faster.
2024-06-19 15:45:02 +02:00
Nico Weber 1cc4d29d20 LibGfx/WebPWriter: Use align_up_to()
No behavior change.
2024-06-16 14:50:32 -04:00
Nico Weber 8c7a0e6334 LibGfx/WebPWriter: Use count_required_bits()
This is slightly longer than doing it manually, but arguably easier
to read. (And we don't need to convert to float and back.)

No behavior to change.
2024-06-16 14:50:32 -04:00
Ozzelot 96007da65b Ports: Add Schism Tracker 2024-06-15 22:59:36 +02:00
Ozzelot 8d5e63d6d3 Ports: Add SpaceCadetPinball
Co-authored-by: Tim Schumacher <timschumi@gmx.de>
2024-06-15 10:59:36 +02:00
Beckett Normington d26e708bcf Ports: Update perl5 to 5.40.0
Released on 2024-06-09. This commit also removes two patches that have
been upstreamed and are no longer needed.
2024-06-15 10:43:08 +02:00
Liav A. 5133c9d4cb Utilities/du: Add options to filter files with min and max sizes
These options supplements the original threshold option, because it's
now possible to specify a threshold and add either minimum/maximum size
for additional filtering.

It's also possible to not use the old threshold option (that Tim
Schumacher told me it was inherited from coreutils) and only specify the
2 new options to create a filtering.
2024-06-15 09:36:39 +02:00
circl 462abc242e Tests/LibWeb: Add test to verify correctness of getImageData
(cherry picked from commit dbc94ce92e09e987f8a07a5b1e978250286b015a)
2024-06-14 18:18:40 -04:00
circl ec7d44d635 Revert "LibWeb: Use memcpy() in CanvasRenderingContext2D.getImageData()"
This reverts commit 59cb7994c6.

This change caused a bug where getImageData returned the image in
BGRA8888 format instead of RGBA8888.

(cherry picked from commit d2f9ba7db1d8dd1dd611e6a3f40b9125b5aa054d)
2024-06-14 18:18:40 -04:00
Erick Howard 407dfdac37 Build: Update mold version to fix build problems
Mold issue 1178 is now fixed, so Serenity is able to build fine
using Mold
2024-06-14 06:45:36 -04:00
Dan Klishch 7b2250e47f Meta: Remove test262 workflow
The runner is gone now and that results in workflows that never end.
2024-06-14 02:08:27 +02:00
Diego cafc66f272 LibWasm: Tighten validation algorithm
The big improvement included in this commit is stack height mismatch
validation. There are other minor improvements included (related to the
validation algorithm). The method of supporting stack polymorphism has
changed to be more like the spec, which was necessary for confidently
handling stack height mismatches.

See:
https://webassembly.github.io/spec/core/appendix/algorithm.html
(cherry picked from commit 9b58271f8b6de2dbfff416780a54e0322f9c6799)
2024-06-13 23:14:39 +02:00
Diego cdf15887db LibWasm: Refactor validator to use one stack for frame information
Previously, the validator had a lot of extraneous information related to
frames. Now, there's just one stack with all the necessary information
derived from it.

(cherry picked from commit ad54b69de9df6ccd44178cbe49779e313f95f273)
2024-06-13 23:14:39 +02:00
Diego ab95169d3c LibWasm: Enable the loop.wast test file
(cherry picked from commit 1486780676fb558904b9bb9966b5a06c7eb128d8)
2024-06-13 23:14:39 +02:00
Diego f6d7702411 LibWasm: Make loops work
This commit should hopefully allow for `loop.wast` to be run in CI.

(cherry picked from commit 6ca6fd248a14ab394f11131c3df029b486952d54)
2024-06-13 23:14:39 +02:00
Diego 1c86b8146a LibWasm: Make memory.fill fill with single bytes
Previously, `memory.fill` filled memory with 4-byte values, even though
`memory.fill` should fill with just one byte. Also fixes some other
issues with some of the bulk memory instructions, like `memory.init`.

(cherry picked from commit d8ee2e343df25d12637e08d54908b4fd86a22dc3)
2024-06-13 23:14:39 +02:00
Diego 3131736164 LibWasm: Add missing spec-test imports
(cherry picked from commit 69e151e79f11d27fbe53ee0f2391ae8e86f90b5b)
2024-06-13 23:14:39 +02:00
Diego 510bfbbbc3 LibWasm: Validate imports
(cherry picked from commit a1ed3e5d8f4f7b9f44ec4d3e15432d60cba9f2ee)
2024-06-13 23:14:39 +02:00
Diego 15effbaf2a LibWasm: Validate that function and code sections match
(cherry picked from commit cda0d6d27746672058b26b0e61d0900dc73b1fb3)
2024-06-13 23:14:39 +02:00
Diego 985c4c590d LibWasm: Validate that data section exists for some instructions
(cherry picked from commit 5e5df136849c1d450a6e0dd4af3805f7e56f6e76)
2024-06-13 23:14:39 +02:00
Diego be3bc9bd7c LibWasm: Disallow multiple start sections
(cherry picked from commit 6b9977a265b8175cf4da68d601ded427cb49e44e)
2024-06-13 23:14:39 +02:00
Diego 96fb79bb98 LibWasm: Make sure no duplicate export names are possible
(cherry picked from commit c51c018fb13f4fb182da5b12e9e3fda69f6b72ef)
2024-06-13 23:14:39 +02:00
Diego 5502c1a1f8 LibWasm: Validate number of data sections
(cherry picked from commit f7d3ab8e160a61abddfe4db9c8d79260e890bb41)
2024-06-13 23:14:39 +02:00
Dan Klishch 7d1d0fe6ad LibHTTP: Support chunked transfer encoding in async HTTP client
This uses AK::{Generator,AsyncStreamTransform,AsyncStreamBuffer} added
in the previous commits.
2024-06-13 17:40:24 +02:00
Dan Klishch 77be5254e1 LibHTTP: Implement bare-bones HTTP/1.1 client using coroutines
We don't have asynchronous TCP socket implementation, so its usefulness
is a bit limited currently but we can still test it using memory
streams. Additionally, it serves as a temporary {show,test}case for the
asynchronous streams machinery.
2024-06-13 17:40:24 +02:00
Dan Klishch 79051e5f79 AK: Add AK::AsyncStreamBuffer
This class encapsulates all the logic required for a buffer of
asynchronous stream.
2024-06-13 17:40:24 +02:00
Dan Klishch 73b4d39189 AK: Add AK::AsyncStreamTransform
This class allows to convert an asynchronous generator which generates
chunks of data into an AsyncInputStream. This is useful in practice
because the said generator often ends up looking very similar to the
underlying synchronous algorithm it describes.
2024-06-13 17:40:24 +02:00
Dan Klishch 0f1d67f2f0 AK: Introduce AK::Generator 2024-06-13 17:40:24 +02:00
Dan Klishch aeb17a864e AK: Instantiate GenericLexer::consume_decimal_integer<size_t> on MacOS
u64 and size_t are different types on it.
2024-06-13 17:40:24 +02:00
Dan Klishch 60476e247b AK: Introduce a few asynchronous stream helpers
These were proven to be generally useful after writing some asynchronous
streams code.
2024-06-13 17:40:24 +02:00
Dan Klishch 205bfcc6c8 LibTest: Add Test::AsyncMemory{Input,Output}Stream
They are useful for unit testing other asynchronous streams. They have
to be tested themselves in the first place though.
2024-06-13 17:40:24 +02:00
Dan Klishch 7fb6d24402 LibTest: Support asynchronous tests 2024-06-13 17:40:24 +02:00
Dan Klishch 6662d5de2b AK: Introduce asynchronous streams 2024-06-13 17:40:24 +02:00
Dan Klishch b15b51f9da AK: Don't delete Badge move constructor
Otherwise it is impossible to use Badge as an argument of a coroutine.
2024-06-13 17:40:24 +02:00
Dan Klishch 8263e0a619 AK: Introduce AK::Coroutine 2024-06-13 17:40:24 +02:00