Skip to content

Assorted improvements and fixes - #163

Merged
d-tatianin merged 8 commits into
masterfrom
misc-improvements
Oct 2, 2026
Merged

d-tatianin merged 8 commits into
masterfrom
misc-improvements

Conversation

@d-tatianin

Copy link
Copy Markdown
Contributor

No description provided.

The path comes from uacpi_kernel_alloc(), so releasing it with a plain
free() bypasses the runner's allocation tracking and shows up as a
leaked allocation.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
The sized-frees runner keeps every live allocation in a hash table,
which made all of them reachable at exit and hid every uACPI leak from
LSan. Drop the table once the test is done so that anything still in
it gets reported with a stack trace.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
enter_method() takes a reference to the method, but frame->method was
only assigned later in frame_setup_base_scope(), and that is the only
pointer call_frame_clear() releases. Any failure in between, such as a
wrong argument count from a native caller or a sync level violation,
leaked the method object along with its code.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
The list of types whose storage was released before overwriting the
destination was missing operation regions, buffer fields, buffer
indices and field units. Use free_object_storage() instead, which
already knows how to release every type.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
A null target is encoded as a NullName byte, which is the same as
ZeroOp, so every op with a discarded result ran ZeroOp just to
produce an integer that store_to_target() then recognized as "no
target". Consume the byte in place instead and leave the target item
without an object.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
A field whose name is already taken by an existing object aborted the
whole table load. Treat it the same way as other named objects during
table load: warn and skip it, while still advancing the bit offset so
the fields that follow keep their layout.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
Fields are only installed once the whole field list has been parsed,
so the existence check done at parse time doesn't see earlier
elements of the same list, and duplicate names within one Field()
ended up installed as separate siblings.

Make uacpi_namespace_node_install() reject a node whose name already
exists in its parent. This is basically free since it already walks
every sibling to find the tail. Duplicate fields are then skipped with
a warning during table load, and are an error elsewhere, consistent
with other named objects.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
@d-tatianin
d-tatianin merged commit fdec0cc into master Oct 2, 2026
4 checks passed
@d-tatianin
d-tatianin deleted the misc-improvements branch October 2, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant