Usually the values of the previous and next pointers of deleted buckets
are never used, as they're not part of the main ordered bucket chain,
but if an in-place rehashing is done, which results in the bucket being
turned into a free bucket, the stale pointers will remain, at which
point any item that is inserted into said free-bucket will have either
a stale previous pointer if the HashTable was empty on insertion, or a
stale next pointer, resulting in undefined behaviour.
This commit also includes a new HashMap test that reproduces this issue
Previously we would leave artifacts on screen if a change caused the
buffer to span fewer lines than the current buffer.
This commit records the shown line count and uses that instead of trying
to guess the previous line count (and failing most of the time).
Currently CursorStyle enum handles both the styles and the steadiness or
blinking of the terminal caret, which doubles the amount of its entries.
This commit changes CursorStyle to CursorShape and moves the blinking
option to a seperate boolean value.
The RDGSBASE userspace instruction allows programs to read the contents
of the gs segment register which contains a kernel pointer to the base
of the current Processor struct.
Since we don't use this instruction in Serenity at the moment, we can
simply disable it for now to ensure we don't break KASLR. Support can
later be restored once proper swapping of the contents of gs is done on
userspace/kernel boundaries.
Now that the lower pages can be unmapped and more of the virtual
address range is available to us, we can actually use the default
mapping address of x86_64 again.
This reverts commit 292398b585.
This keeps us from needlessly allocating storage via `malloc` as part
of the `Vector`s that early, which we might conflict on while reserving
memory for the main executable.
We previously trusted the `map` part in `map_library` too much, and
assumed that this would already lock in the binary at its final place.
However, the `map()` function of the loader was only called in
`load_main_library`, which ran only right before jumping to the
entrypoint.
Make our binary loading a bit more stable by actually mapping the binary
right after we read its information, and only do the linking right
before jumping to the entrypoint.
This is basically unchanged since the beginning of 2020, which is a year
before we had proper ASLR.
Now that we have a proper ASLR implementation, we can turn this down a
bit, as it is no longer our only protection against predictable dynamic
loader addresses, and it actually obstructs the default loading address
of x86_64 quite frequently.
We were not applying the distributed space to the used offset of flex
items, as we were only assigning the margins to the layout state of the
box, not the internal FlexItem::margins.
Before we ask a replaced box about its intrinsic dimensions, we have
to "prepare" the box, which tells it to go and work out what its
intrinsic dimensions are.
I've added a FIXME about how this is silly (and clearly bug-prone)
but this patch only patches it locally in FFC for now.
If the request is stopped RequestServer::did_finish_request() will crash
on the VERIFY() call since request.total_size.has_value() returns false.
Let us instead use a conditional expression to verify if it has a value
and then call async_request_finished().
When a dialog is created the position is checked against the Desktop's
rect and repositioned to be entirely visible. If the dialog is larger
than the desktop's rect it is just centered.
Adds some logic to reposition menus that would appear off the right or
bottom edge of the screen so they appear completely on screen.
Co-authored-by: Sam Atkins <atkinssj@gmail.com>
This is a reimplementation of draw_triangle that manages without
floating point arithmetic.
It's most important property, compared to the previous implementation is
that rotating the same triangle 90 degrees won't drastically change the
appearance of that triangle. (it did before)
This doesn't actually change anything in appearance, but it lays the
groundwork to have these graphics scaling compatible once the window
backstores support that.
Since macOS's filesystem is case-insensitive, its `tic` only generates
terminfo directory names that are hex numbers instead of letters, such
as 78/xterm instead of x/xterm. However, the configure script still
enables the mixed-case directory name feature by default. As a result,
ncurses will fail when trying to find terminfo entries like x/xterm if
they are generated on macOS.
It seems like there is no way to change the behavior of `tic` to create
alphabetical directories, so we can only disable this option explicitly.
Used by Google seemingly almost all around account sign in and
management. The modern sign in page has this near the beginning:
```html
<base href="https://accounts.google.com">
```
All of the XHRs performed by sign in are relative URLs to this
base URL. Previously we ignored this and did it relative to the
current URL, causing the XHRs to 404 and sign in to fall apart.
I presume they do this because you can access the sign in page
from multiple endpoints, such as `/ServiceLogin` and
`/o/oauth2/auth/identifier`