summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-17LibC: Make scanf always copy its va_listPeter Bindels
On x86_64 GCC implements va_list as an array. This makes the syntax for taking a pointer to it break & crash. The workaround / solution is to create a copy. Since va_list is a tiny struct referencing the actual varargs, this is little overhead (especially compared to va_args itself)
2021-07-17Kernel: Initialize TimeManagement before using KernelRNGTom
We should initialize the timers before KernelRNG as the RNG may want to utilize system time as an entropy source. Fixes #8710
2021-07-17Kernel: Remove TimeManagement::initialized that wasn't implementedTom
2021-07-17Shell: Don't assume that only the current shell may continue childrenAli Mohammad Pur
That can happen because of anyone sending the process a SIGCONT. Fixes an issue where continuing a process launched by the shell from the System Monitor would cause the shell to spin on waitpid().
2021-07-17LibWeb: Avoid UAF in query_selector{,_all}()Alexander
This fixes a bug that caused the selector to be dumped. It would relase the RefPtr into a dump function, and then use it.
2021-07-16LibJS: Implement Temporal.Duration.prototype.abs()Linus Groh
2021-07-16LibJS: Implement Temporal.Duration.prototype.negated()Linus Groh
2021-07-16LibJS: Implement Temporal.Duration.prototype.with()Linus Groh
2021-07-16LibJS: Add TokenType::{Debugger,With} to Token::is_identifier_name()Linus Groh
Also remove TokenType::Interface, that should be handled elsewhere (as a 'future reserved word' in strict mode).
2021-07-17LibWasm: Remove a useless use of ScopeGuardAli Mohammad Pur
There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead.
2021-07-17LibWasm+Everywhere: Make the instruction count limit configurableAli Mohammad Pur
...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this.
2021-07-17LibWasm: Inline some very hot functionsAli Mohammad Pur
These are mostly pretty small functions too, and they were about ~10% of runtime.
2021-07-17wasm: Don't try to print the function results if it trapsAli Mohammad Pur
2021-07-17Revert "LibWasm: Some more performance stuff (#8812)"Ali Mohammad Pur
This reverts commit 35394dbfaa23b44a293da85b20a63a10f73572c3. I pushed the wrong button again, hopefully this will be the last of such incidents.
2021-07-17LibWasm: Some more performance stuff (#8812)Ali Mohammad Pur
* wasm: Don't try to print the function results if it traps * LibWasm: Inline some very hot functions These are mostly pretty small functions too, and they were about ~10% of runtime. * LibWasm+Everywhere: Make the instruction count limit configurable ...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this. * LibWasm: Remove a useless use of ScopeGuard There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead.
2021-07-16Kernel+AK: Generate compile-time error for non-sized `delete`Daniel Bertalan
This is a much more ergonomic option than getting a `VERIFY_NOT_REACHED()` failure at run-time. I encountered this issue with Clang, where sized deallocation is not the default due to ABI breakage concerns. Note that we can't simply just not declare these functions, because the C++ standard states: > If this function with size parameter is defined, the program shall > also define the version without the size parameter.
2021-07-16Kernel: Implement aligned `operator new` and use itDaniel Bertalan
The compiler will use these to allocate objects that have alignment requirements greater than that of our normal `operator new` (4/8 byte aligned). This means we can now use smart pointers for over-aligned types. Fixes a FIXME.
2021-07-16Kernel: Tell the compiler about `operator new`'s alignmentDaniel Bertalan
By default, the compiler will assume that `operator new` returns pointers that are aligned correctly for every built-in type. This is not the case in the kernel on x64, since the assumed alignment is 16 (because of long double), but the kmalloc blocks are only `alignas(void*)`.
2021-07-16LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object aliveTimothy Flynn
Fixes a crash found with 'test-js -g' due to this object going out of scope.
2021-07-16LibPDF: Fix treating not finding the linearized dict as a fatal errorWesley Moret
We now try to parse the first indirect value and see if it's the `Linearization Parameter Dictionary`. if it's not, we fallback to reading the xref table from the end of the document
2021-07-16LibPDF: Fix checking `minor_ver` instead of `major_ver`Wesley Moret
2021-07-16ThemeEditor: Set window size to 480x385 and disable resizingLuK1337
2021-07-16ThemeEditor: Add menu bar with quit and about itemsLuK1337
2021-07-16Kernel: Rename functions to be less confusingTom
Thread::yield_and_release_relock_big_lock releases the big lock, yields and then relocks the big lock. Thread::yield_assuming_not_holding_big_lock yields assuming the big lock is not being held.
2021-07-16Kernel: Release big lock when blocking on another lockTom
When blocking on a Lock other than the big lock and we're holding the big lock, we need to release the big lock first. This fixes some deadlocks where a thread blocks while holding the big lock, preventing other threads from getting the big lock in order to unblock the waiting thread.
2021-07-16Kernel: Fix some Lock problems and VERIFY statementsTom
When a Lock blocks (e.g. due to a mode mismatch or because someone else holds it) the lock mode will be updated to what was requested. There were also some cases where restoring locks may have not worked as intended as it may have been held already by the same thread. Fixes #8787
2021-07-16Kernel: Make the page table for the kernel image largerGunnar Beutner
Building the x86_64 kernel with ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS results in an image that is larger than 0x2000000 bytes.
2021-07-16Kernel: Make resizing the page tables for the kernel image easierGunnar Beutner
By using the KERNEL_PD_OFFSET constant we can avoid some of the hard-coded values in the boot code.
2021-07-16Kernel: Move end_of_kernel_image after the .ksyms sectionGunnar Beutner
Without this we won't be able to detect whether .ksyms overlaps the end of the page table we set up for the kernel image.
2021-07-16Kernel: Support specifying a 64-bit KERNEL_BASE addressGunnar Beutner
The kernel doesn't currently boot when using an address other than 0xc0000000 because the page tables aren't set up properly for that but this at least lets us build the kernel.
2021-07-16Kernel: Avoid unnecessary jump in the boot codeGunnar Beutner
The 32-bit boot code jumps to 0xc0000000 + entry address once page tables are set up. This is unnecessary for 64-bit mode because we'll do another far jump just moments later.
2021-07-16Kernel: Avoid hard-coding kernel virtual baseGunnar Beutner
2021-07-16Kernel: Remove stale forward declaration of BochsFramebufferDeviceLiav A
2021-07-16LibJS: Replace the boolean argument of Object::set with an enum classIdan Horowitz
This is more serenity-esque and also makes pointing out missing exception checks during reviews much easier.
2021-07-16LibJS: Remove unused Object::PutOwnPropertyMode enum classIdan Horowitz
All usages of this enum class were removed in the Object rewrite, but this enum was left behind.
2021-07-16Kernel: Fix bogus check in Thread::WaitBlockCondition::finalize()Andreas Kling
I botched this in 859e5741ffd3c5be57a3c3ef4c08c6372e2ff35c, the check was supposed to be with Process::is_kernel_process(). This fixes an issue with zombie processes hanging around forever. Thanks tomuta for spotting it! :^)
2021-07-16LibJS: Implement RegExp AdvanceStringIndex abstractionTimothy Flynn
This isn't particularly useful yet because the underlying LibRegex engine doesn't support unicode matching yet. But the debt of FIXMEs related to AdvanceStringIndex have added up, so let's get this out of the way.
2021-07-16LibJS: Implement RegExp.prototype [ @@matchAll ]Timothy Flynn
This also allows String.prototype.matchAll to work, as all calls to that method result in an invocation to @@matchAll.
2021-07-16LibJS: Implement the RegExpStringIterator objectTimothy Flynn
This implementation closely follows the StringIterator object in that the abstract closure meant to be created in CreateRegExpStringIterator is instead unrolled into RegExpStringIterator.prototype.next.
2021-07-16LibJS: Make the RegExpExec abstraction publically availableTimothy Flynn
For RegExpStringIterator, this will be needed outside of the RegExp prototype.
2021-07-16Assistant: Keep the Terminal window open after the command has runGunnar Beutner
2021-07-16HackStudio: Add statusbar with file and selected text informationry-sev
2021-07-16LibWeb: Fix assertion failures in HTMLTokenizerMax Wipfli
The *TagName states are all very similar, so it seems to be correct to apply the fix from #8761 to all of those states. This fixes #8788.
2021-07-16LibELF/DynamicLinker: Evaluate symbols in library insertion order (#8802)Peter Bindels
When loading libraries, it is required that each library uses the same instance of each symbol, and that they use the one from the executable if any. This is barely noticeable if done incorrectly; except that it completely breaks RTTI on Clang. This switches the hash map to be ordered; tested to work for Clang by @Bertaland
2021-07-16AK/Tests: Add test for EnumBits has_any_flag()Timothy
This test will pass when any flag in the mask is present in the value.
2021-07-16AK+Kernel: Implement and use EnumBits has_any_flag()Timothy
This duplicates the old functionality of has_flag and will return true when any flags present in the mask are also in the value.
2021-07-16AK/Tests: Add test for EnumBits has_flag()Timothy
This test requires that all values in the mask are present in the value as well.
2021-07-16AK: Change EnumBits has_flag() to check all flags in mask are presentTimothy
Co-authored-by: Brian Gianforcaro <b.gianfo@gmail.com>
2021-07-16Kernel: Return ENOMEM on allocation failures in FramebufferDevice::mmapLuke
2021-07-16Kernel/Ext2FS: Don't hog inode lock in traverse_as_directory()Andreas Kling
Reimplement directory traversal in terms of read_bytes() instead of doing direct block access. This lets us avoid taking the inode lock while iterating over the directory contents.