summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-14Userland: Rename QuickShow => Image ViewerAndreas Kling
The old name was a bit too ambiguous. This one is crystal clear. :^)
2021-05-14AK: Remove unused STRINGIMPL_DEBUG instrumentationAndreas Kling
2021-05-14Browser: Don't spawn RequestServer and WebSocket in multi-process modeAndreas Kling
Single-process Browser forces a connection to these services early on, to avoid having to unveil their paths. I'm suspicious of the benefits of this (and the comment about it wasn't even accurate) but let's keep it for now. In multi-process mode, there's no need to do this, and in fact it was causing us to spawn two extra totally unused processes.
2021-05-14Profiler: Mark model columns as non-sortableAndreas Kling
This removes the ability to click on the column headers to resort. Resorting didn't do anything anyway.
2021-05-14Kernel: Merge do_retransmit_packets() into retransmit_packets()Gunnar Beutner
2021-05-14Kernel: Try to retransmit lost TCP packetsGunnar Beutner
Previously we didn't retransmit lost TCP packets which would cause connections to hang if packets were lost. Also we now time out TCP connections after a number of retransmission attempts.
2021-05-14Kernel: Wake up NetworkTask every 500 millisecondsGunnar Beutner
This wakes up NetworkTask every 500 milliseconds so that it can send pending delayed TCP ACKs and isn't forced to send all of them early when it goes to sleep like it did before.
2021-05-14Kernel: Don't use delayed ACKs when establishing the connectionGunnar Beutner
When establishing the connection we should send ACKs right away so as to not delay the connection process. This didn't previously matter because we'd flush all delayed ACKs when NetworkTask waits for incoming packets.
2021-05-14Meta: Add note about writing commit subjects in the imperative moodAndreas Kling
2021-05-14AK: Make StringView::hash() constexprAndreas Kling
This required moving string_hash() to its own header so that everyone can see it.
2021-05-14Kernel: Add the ability to verify we don't kmalloc under spinlock.Brian Gianforcaro
Ideally we would never allocate under a spinlock, as it has many performance and potentially functionality (deadlock) pitfalls. We violate that rule in many places today, but we need a tool to track them all down and fix them. This change introduces a new macro option named `KMALLOC_VERIFY_NO_SPINLOCK_HELD` which can catch these situations at runtime via an assert.
2021-05-14LanguageServer/Cpp: Add testsItamar
The Cpp LanguageServer tests can be run with: CppLanguageServer -t The tests now only cover some very simple autocomplete and "find declaration" use cases, but it's a start :)
2021-05-14LanguageServers: Allow set_declarations_of_document callback to be nullItamar
2021-05-14LanguageServers/FileDB: Allow m_project_root to be nullItamar
2021-05-14LanguageServers: Remove ClientConnection dependencyItamar
We now no longer need to provide a ClientConnection object to construct AutoCompleteEngine.
2021-05-14Documentation: Add a note about enabling the `console` iPXE commandIdan Horowitz
This command is used in the given script, and in the latest version of iPXE its disabled by default
2021-05-14Meta: Specify that we use ISO 8601 dates and the metric systemAndreas Kling
2021-05-14AK: Avoid allocations in ByteBufferGunnar Beutner
Creating a ByteBuffer involves two allocations: -One for the ByteBufferImpl object -Another one for the actual byte buffer This changes the ByteBuffer and ByteBufferImpl classes so only one allocation is necessary.
2021-05-14AK: Use move semantics to avoid copying in JSON parserAndreas Kling
The JSON parser was deep-copying JsonValues left and right, and it was all totally avoidable. :^)
2021-05-14Profiler: Avoid JsonArray copying during perfcore parsingAndreas Kling
Use JsonObject::get_ptr() to access array values without copying them.
2021-05-14LibGUI: Fix logic typo in AbstractTableView::update_row_sizes()Andreas Kling
We should skip over non-visible *rows*, not *columns*.
2021-05-14LibCrypto: Prevent a signed overflow during BigInt Modular PowerDexesTTP
The algorithm isn't explicit about what type this needs to be. But this passes all of the tests, so that's probably fine.
2021-05-14Kernel: Avoid unnecessary time under lock in TCPSocket::createBrian Gianforcaro
Avoid holding the sockets_by_tuple lock while allocating the TCPSocket. While checking if the list contains the item we can also hold the lock in shared mode, as we are only reading the hash table. In addition the call to from_tuple appears to be superfluous, as we created the socket, so we should be able to just return it directly. This avoids the recursive lock acquisition, as well as the unnecessary hash table lookups.
2021-05-14Kernel: Remove dead TCPSocket::from_endpoints methodBrian Gianforcaro
2021-05-14LibGUI: Resize GUI::HeaderView section vector to final size immediatelyAndreas Kling
When computing row & column sizes in AbstractTableView, it iterates across both axes starting from 0. This caused us to grow the corresponding HeaderView's internal section vector by 1 entry for each step, leading to Vector::resize() thrashing. Since we already know the final size, just resize to that immediately, and the thrashing goes away. This gives a huge speedup when loading large files into Profiler. :^)
2021-05-14Profiler: Avoid copies / String construction when parsing profile (#7096)Brian Gianforcaro
Use sv literal suffix to construct StringViews at compile time, and make sure to reference array items by const reference.
2021-05-14LibTLS: Actually verify the certificatsAli Mohammad Pur
This was likely commented out at some point to debug something.
2021-05-14LibCrypto+LibTLS: Avoid unaligned reads and writesAli Mohammad Pur
This adds an `AK::ByteReader` to help with that so we don't duplicate the logic all over the place. No more `*(const u16*)` and `*(const u32*)` for anyone. This should help a little with #7060.
2021-05-14AK: Avoid passing nullptr to __buitin_memcpy() in ByteBuffer::grow()Ali Mohammad Pur
2021-05-14LibCrypto: Do not assume that the passed in IV is as long as a blockAli Mohammad Pur
Just take ReadonlyBytes instead of a raw pointer. Fixes #7072 (tested with the ASAN build fixed by #7060).
2021-05-14Tests: Don't use TestRunners after their scope ends in test-jsAndrew Kaster
The TestRunner objects at the end of test-js are destroyed after the if/else that chooses whether to run the 262 parser tests or the standard tests. Accessing TestRunner::the() after the lifetime of the TestRunners ends is UB, so return the Test::Counts from run() instead. Also, fix the destructor of TestRunner to set s_the to nullptr so that if anyone tries this type of shenanigains again, they'll get a crash :^).
2021-05-14LibJS: Make sure all allocators are 8-byte alignedAndrew Kaster
Absolutely massive allocations > 1024 bytes would go into the size class which was 3172 bytes. 3172 happens to not be 8 byte aligned, and so made UBSAN very sad on x86_64. Change the largest allocator to be 3072 bytes, which is in fact a multiple of 8 :^)
2021-05-14Tests: Mark use-after-scope NeverDestroyed test NO_SANITIZE_ADDRESSAndrew Kaster
The should_not_destroy test case intentionally performs an invalid stack access on a NeverDestroyed to confirm that the destructor for the held type was not called.
2021-05-14Tests: Free all memory allocated with regcomp in RegexLibC testsAndrew Kaster
The C interface (posix interface?) for regexes has no "initialize" function, only a free function. The comment in regcomp in LibRegex/C/Regex.cpp notes that calling regcomp without a regfree is an error, and will leak memory. Every single time regcomp is called on a regex_t*, it will allocate new memory. Make sure that all the regcomp calls are paired with a regfree in the tests program
2021-05-14Tests: Fix use-after-free in TestRefPtr.self_observersAndrew Kaster
We can't unref an object to destruction while there's still a live RefPtr to the object, otherwise the RefPtr destructor will try to destroy it again, accessing the refcount of a destroyed object (before realizing that oops! the object is already dead)
2021-05-14AK: Add #define for [[gnu::no_sanitize_address]]Andrew Kaster
This lines up with other attribute global #defines
2021-05-14Lagom: Enable sanitizer builds with gccAndrew Kaster
Previously the CMake options for -fsanitize=address, thread and undefined were gated behind clang, which was unecessary. Only -fsanitize=fuzzer is clang-only.
2021-05-13LibJS: Ensure function declarations don't leak outside function scopesLinus Groh
When using VM::set_variable() to put the created ScriptFunction onto a ScopeObject, we would previously unexpectedly reach the global object as set_variable() checks each traversed scope for an existing Variable with the given name - which would cause a leak of the inner function past the outer function (we even had a test expecting that behaviour!). Now we first declare functions (as DeclarationKind::Var) before setting them. This will need some more work to make hoisting across non-lexical scopes work, but it fixes this specific issue for now. Fixes #6766.
2021-05-13LibJS/Tests: Add details for toBeTrue() / toBeFalse() expectation errorLinus Groh
2021-05-13LibJS/Tests: Add details for toThrowWithMessage did-not-throw caseLinus Groh
2021-05-13LibJS/Tests: Add prefix to toThrowWithMessage expectation error detailsLinus Groh
This way we get some more information about where things went wrong.
2021-05-14Kernel: Correctly set the lost_samples field for the first sampleGunnar Beutner
This ensures that the lost_samples field is set to zero for the first sample. We didn't lose any samples before the first sample so this is the correct value. Without this Profiler gets confused and draws the graph for the process which contains the first CPU sample incorrectly (all zeroes usually).
2021-05-14Kernel+Profiler: Track lost time between profiler timer ticksGunnar Beutner
We can lose profiling timer events for a few reasons, for example disabled interrupts or system slowness. This accounts for lost time between CPU samples by adding a field lost_samples to each profiling event which tracks how many samples were lost immediately preceding the event.
2021-05-14Kernel: Use a separate timer for profiling the systemGunnar Beutner
This updates the profiling subsystem to use a separate timer to trigger CPU sampling. This timer has a higher resolution (1000Hz) and is independent from the scheduler. At a later time the resolution could even be made configurable with an argument for sys$profiling_enable() - but not today.
2021-05-14Profiler: Let the user ignore context switchesGunnar Beutner
Now that the profiling timer is independent from the scheduler the user will get quite a few CPU samples from "within" the scheduler. These events are less useful when just profiling a user-mode process rather than the whole system. This patch adds an option to Profiler to hide these events.
2021-05-14Profiler: Add histogram for sample countsGunnar Beutner
Previously Profiler would use the stack depth to draw the timeline graphs. This is not an accurate representation of whether a thread is "busy" or not. Instead this updates the timelines to use the sample count.
2021-05-14AK: Vector::resize() should initialize new slots for primitive typesGunnar Beutner
We call placement new for the newly added slots. However, we should also specify an initializer so primitive data types like u64 are initialized appropriately.
2021-05-13InspectorServer: Add another missing <AK/JsonObject.h> includeAndreas Kling
2021-05-13CMake: Make missing medium icon a FATAL_ERRORBrian Gianforcaro
Now that all of the medium icons pass this check, we can make it FATAL_ERROR to stop any new violations from being checked in.
2021-05-13InspectorServer: Add missing <AK/JsonObject.h> includeAndreas Kling