summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-24LibJS: Implement Object.prototype.propertyIsEnumerableLuke
Spec: https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable This is used by core-js, which is used by frameworks such as Vue.
2020-12-24Meta: Verify all AK test files are listed in CMakeLenny Maiorani
Problem: - It is possible for a new test file to be added to the `AK/Tests` directory without being added to the corresponding `CMakeLists.txt`. This results in the tests not being run. Solution: - As part of CI linting, verify that all the `AK/Tests/Test*.cpp` files are mentioned in the `CMakeLists.txt`.
2020-12-24Base: Remove [Icons] section from .af filesLinus Groh
With everything now using GUI::FileIconProvider and therefore loading icons embedded in the executable files, this information is now longer being used. We might have to think about this again if we want to allow .af files with custom commands (e.g. shell scripts). Maybe those could get away with just an "Icon" entry under "[App]", but currently there's only "Executable" anyway.
2020-12-24Taskbar: Use GUI::FileIconProvider for app iconsLinus Groh
2020-12-24SystemMenu: Use GUI::FileIconProvider for app iconsLinus Groh
2020-12-24Terminal+LibVT: Use GUI::FileIconProvider for app iconsLinus Groh
2020-12-24DynamicLoader: Call libc's exit when exitting, to flush standard streamsSahan Fernando
2020-12-24Userland: Make grep exit after hitting EOF on stdinSahan Fernando
2020-12-24Userland: Add strace parameter for output log fileSahan Fernando
2020-12-24Userland: Add pmap utilityBrendan Coles
2020-12-24Meta: Update install guide with link to hardware compatibility listDan MacDonald
2020-12-24CMake: Decouple cmake utility functions from top-level CMakeLists.txtLenny Maiorani
Problem: - These utility functions are only used in `AK`, but are being defined in the top-level. This clutters the top-level. Solution: - Move the utility functions to `Meta/CMake/utils.cmake` and include where needed. - Also, move `all_the_debug_macros.cmake` into `Meta/CMake` directory to consolidate the location of `*.cmake` script files.
2020-12-24Meta: Add Brendan Coles to the contributors list :^)Andreas Kling
2020-12-24ProcFS: pid_vm: Replace duplicated purgeable key with kernel+cacheableBrendan Coles
ProcFS /proc/<pid>/vm map info no longer contains two `purgeable` keys. The second `purgeable` key has been removed and replaced with keys for `kernel` and `cacheable`.
2020-12-24LaunchServer: Ignore empty FileType / Protocol / [Launcher] config valuesLinus Groh
"Foo=" should be treated the same as "Foo" being missing.
2020-12-24LaunchServer+Base: Stop using Browser as default protocol handlerLinus Groh
Browser supports very few protocols (http, https, gemini, file) at the moment, so there's no point in using it as a catch-all and default protocol handler. I added an explicit association for gemini to /bin/Browser instead. This stops Desktop::Launcher::open() from reporting success for any URL, which really isn't the case (Browser shows an error page...).
2020-12-24open: Mention full URL in 'Failed to open' error messageLinus Groh
Just showing the URL's path is confusing, that would show '/' for something like foo://bar.
2020-12-24open: Handle file:// URLs properlyLinus Groh
open(1) was able to handle most URLs as well as paths, but not file:// URLs (which occur when dragging something from the output of ls, for example). We have to create an URL from the user-supplied argument using create_with_url_or_path(), check whether it's a file:// URL or not and *then* use real_path_for() on the URL's path().
2020-12-24open: Remove extraneous newline from error outputLinus Groh
This wasn't removed when fprintf was replaced by warnln.
2020-12-23CMake: Remove file globbing in AK/TestsLenny Maiorani
Problem: - File globbing is performed at the time of build system generation. Any files which are not there at that time are not included. So, when a new file is added it is not built unless the build system is recreated. Solution: - Remove globbing from AK/Tests directory in favor of explicitly listing the files.
2020-12-23Kernel: Tweak parameter name in Inode::read_entire()Andreas Kling
This is a descriptION, not a descriptOR. :^)
2020-12-23Kernel: Fix wrong-looking overflow check in sys$execve()Andreas Kling
This was harmless since sizeof(length) and sizeof(strings) are both 4 on x86 but let's check the right things regardless.
2020-12-23Kernel: Don't assert when reading from a listening-mode local socketAndreas Kling
Instead just fail with EINVAL as a listening socket is never suitable for reading from. Fixes #4511.
2020-12-23LibGfx: Always compute the DIB mask shifts and sizes if neededAndreas Kling
The pixel decoding logic later on assumes that if we have DIB masks, we also have shifts and sizes, so we should make sure they are always computed. Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28237
2020-12-23LibGfx: Fail JPEG decode instead of asserting on bogus start-of-scanAndreas Kling
Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28628
2020-12-23LibGfx: Catch integer overflows in PNG decoder and fail the decodeAndreas Kling
Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28134&sort=reported&q=serenity
2020-12-23LibGfx: Avoid a ByteBuffer heap allocation in PNG filteringAndreas Kling
2020-12-23LibGfx: Reject PNG files with invalid filter/interlace methodsAndreas Kling
Might as well reject these when parsing the IHDR chunk instead of continuing to load something invalid.
2020-12-23LibCore: Stop logging that a Core::Socket has disconnected in receive()Andreas Kling
This is perfectly normal and nothing we need to inform about.
2020-12-23Spreadsheet: Prompt user before closing with unsaved changesXavier Cooney
2020-12-23Kernel: Ptrace::handle_syscall() should return errors as KResultAndreas Kling
2020-12-23Kernel: Don't assert on PT_PEEK with kernelspace addressAndreas Kling
We were casting the address to Userspace<T> without validating it first which is no good and will trap an assertion soon after. Let's catch this sooner with an ASSERT in the Userspace<T> constructor and update the PT_PEEK and PT_POKE handlers to avoid it. Fixes #4505.
2020-12-23Kernel: Panic if we're about to switch to a user thread with IOPL!=0Andreas Kling
This is a crude protection against IOPL elevation attacks. If for any reason we find ourselves about to switch to a user mode thread with IOPL != 0, we'll now simply panic the kernel. If this happens, it basically means that something tricked the kernel into incorrectly modifying the IOPL of a thread, so it's no longer safe to trust the kernel anyway.
2020-12-23TextEditor: Rename {Main => TextEditor}Window.gmlLinus Groh
Calling the file MainWindow.gml (and subsequently using MainWindowGML.h for the generated file's name) suggests that's possible for every application, but having a second one anywhere results in the following CMake error: add_custom_target cannot create target "generate_MainWindowGML.h" because another target with the same name already exists. The existing target is a custom target created in source directory [...] It's now also more consistent with the other applications already using GML, namely "BrowserWindow.gml" and "FileManagerWindow.gml".
2020-12-23cp: Don't copy the set-uid or set-gid bitsAndreas Kling
Also simplify the file copying logic a bit to avoid two syscalls per file. We now create the file with the right mode right away instead of creating it first, and then fchmod'ing it later. Fixes #4479.
2020-12-23LibDebug: Allow DWARF compilation unit header version <= 4Andreas Kling
I think this is okay, the main thing to protect against is new versions of the format that we don't know about yet. This happens because an .S file compiled into libc.so has version 2 instead of version 4 like everything else. Fixes #4491.
2020-12-23Kernel: Make KBuffer::try_create_with_bytes() actually copy the bytesAndreas Kling
KBuffers created with this API were actually just zero-filled instead of being populated with the provided bytes. Fixes #4493.
2020-12-22Chess: Use the hourglass cursor while waiting for the ChessEngineTom
2020-12-22LibCore: Rename identifiers that can clash with libc macros (#4127)ร‰rico Nogueira Rolim
POSIX allows the default streams (stdin, stdout and stderr) to be macros, which means that on such systems (musl libc is one) building Lagom will fail due to the File::std*() names. Also fix any files that use these identifiers.
2020-12-22FileManager: Allow creating desktop shortcut from FileManagerAlex McGrath
2020-12-22Spreadsheet: Fix invalid check in SheetGlobalObject::column_index()AnotherTest
2020-12-22Spreadsheet: Improve sheet update efficiencyAnotherTest
There's no need to leave the cell dirty when not updating it, and there's definitely no need to update the cells as we're selecting them. This makes navigating a sheet and selecting cells significantly faster as we no longer update unrelated cells just because they appear to have a cyclic update dependency :^)
2020-12-22Spreadsheet: Do not attempt to create columns with "negative" indicesAnotherTest
2020-12-22Spreadsheet: Override `visit_edges()` and visit stored JS objectsAnotherTest
...and don't let them leak out of their evaluation contexts. Also keep the exceptions separate from the actual values. This greatly reduces the number of assertions hit while entering random data into a sheet.
2020-12-22Spreadsheet: Make it possible to rename sheetsAnotherTest
2020-12-22Spreadsheet: struct Cell => class CellAnotherTest
Hide private members, and make the odd update() -> sheet->update(cell) -> update(Badge<Sheet>) -> update_data() less odd by removing the update(Badge<Sheet>) step.
2020-12-22Spreadsheet: Accept (and ignore) invalid 'columns' in jsonAnotherTest
The save functionality omits these when the names are standard, so just ignore them if they don't exist (or are not valid).
2020-12-22LibC: __generate_unique_filename(): Replace rand() with arc4random()Brendan Coles
LibC stdlib `arc4random()` uses the `getrandom` system call which uses `KernelRng::get_good_random_bytes`. This ensures that filenames generated using functions such as `mkstemp()` are suitably randomised and are no longer predictable.
2020-12-22CMake: Use built-in add_compile_definitions for *_DEBUG macrosLenny Maiorani
Problem: - Modifying CXXFLAGS directly is an old CMake style. - The giant and ever-growing list of `*_DEBUG` macros clutters the top-level CMakeLists.txt. Solution: - Use the more current `add_compile_definitions` function. - Sort all the debug options so that they are easy to view. - Move the `*_DEBUG` macros to their own file which can be included directly.
2020-12-22Meta: Use the correct clang-formatBen Wiederhake
After all the work of determining the correct name for clang-format-10, we forgot to actually use it. How silly!