Repository navigation
Assorted improvements and fixes - #163
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.