- Some of the recent changes for memory management exposed a race
condition, where the teams window would potentially try to access
already freed objects on quit. Ensure we acquire references to the target
host so this doesn't happen.
AttributeClasses:
- Fix typo in get_attribute_name_classes which resulted in us not
handling DW_AT_linkage_name properly.
- Fix incorrect class specification for DW_AT_default_value due
to inconsistencies in the DWARF documentation (the table of attribute
classes indicates it is only a reference, but the detailed description
indicates it also being possible to be a flag or constant, both of
which gcc outputs).
DebugInfoEntries:
- Add accessor for DIEClassBaseType's inner types.
DwarfImageDebugInfo:
- When looking up types, create a basic target interface to pass on
to the type context. Otherwise, type lookups that required DWARF
expression evaluation would crash.
- When building the type name table, we now recursively walk a class's
inner types, and add them to the list as well. This omission would
cause the debugger to lack the type description for such classes,
and consequently be unable to display their details in the variables
view.
AbstractTable/Table/TreeTable:
- Let BColumnListView take care of deleting columns. The previous
approach was resulting in the columns being leaked.
Debugger:
- Don't detach the UI reference, as TeamDebugger will acquire its own.
GraphicalUserInterface:
- Cleanup of file panel handler.
SourceView:
- Clean up marker manager.
*Roster:
- Clean up registered objects in destructors.
GlobalTypeLookup:
- Clean up hash tables.
NetworkTargetHostInterfaceInfo:
- Fix reference handling for settings.
BListValueNode:
- BList's item count member is an int32. However, when the handler was reading
said variable, it was mistakenly reading the number of bytes corresponding to
to the address size of the architecture instead.This would cause the read to
fail, and consequently BList and/or BObjectList variables to not display
their contents properly on x86-64.
- Fix various cases where OpenHashTables weren't being cleared properly.
- Fix various reference counting errors.
- Simplify FileManager reference handling.
- Fix bug in LocatableDirectory where the directory named '/' would have its
name returned as empty. This would lead to failed lookups for entries already
in the table, and ultimately corrupted the hash table when deleting unused
entries, leading to #13939. This was previously never noticed due to the
entries not being freed properly.
- AbbreviationTable wasn't clearing its entries.
Now vaguely follows the tree structure of "src", with the exception of
directories that described subsystems spanning more than one "kit" or
"server" (e.g. "media", "midi", "bluetooth") -- these have been left as their
own top-level directory within docs/develop.
This is the beginning of a large "move developer docs from the wiki
to the tree" operation, which will probably take some time to complete.
The general goal is to consolidate all docs that would be used by developers
(i.e., anyone working on the Haiku tree) into the tree itself. Docs on
getting started contributing, or for translators, designers, etc. will remain
on Trac and on the website.
PlaylistTrackCount returns the number of tracks in Playlist,
and PlaylistTrackTitle the title of a numbered track.
Also, remove B_TRANSLATE macros in scripting properties
when compiled in kernel mode, BMemoryIO::WriteAt() and BBufferDataReader::ReadData()
now check the buffer to write to, and eventually call user_memcpy() instead of memcpy().
* avoid assignment in if statements
* use boolean conditions
* use copy_from_user_value/copy_to_user_value instead of user_memcpy
* no functional changes except user buffer addresses check in:
_user_get_next_disk_device_id(), _user_get_disk_system_info(),
_user_get_next_disk_system_info(), _user_find_disk_system()
* remove TODO "Add user address checks and check return values of user_memcpy()!".
The scheduler uses the load tracking logic to compute the load of
threads to be enqueued into the run queue. The time delta between the
last enqueue and the next enqueue may grow very large for threads
that mostly wait on conditions. In such cases the int "n" period count
variable would become too small and wrap around, leading to an
assertion failure.
For this to happen, the thread in question would have to have slept for
at least ~25 days and then wake up. Threads often affected would be ones
waiting for some other process to end, for example shell threads waiting
for a long running process to exit.
Fixes#13558.
In the kernel and command-line tool, don't leak allocated memory,
even if the tool returns an error.
In the command-line tool, also handle memory allocation errors
nicely by giving the user an OOM message if allocation fails.
Fixes CID 1425367 and 1425224.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
It appears as if there is a typo in printf_size.c; it makes
no sense to compare an unitialized variable in such a way.
Since `info->width` is referenced later on in the variable
assignment, it seems possible that the intended statement
was to place the larger of the values between `info->width`
and `info->prec` into `width`.
Fixes CID 609431.
korli: Patch applied in cddfcf2f87
was incomplete. This patch completes with what upstream did in 2004:
fa5753eede.patch
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
Previously dead teams were always returned (as needed for wait/waitpid).
Using waitid it should however be possible to omit the WEXITED flag to
only get stopped (WUNTRACED | WSTOPPED) or continued (WCONTINUED) teams.
Adjust the other caller of the _kern_wait_for_child syscall, used by the
various less specific wait* functions, to always include WEXITED. This
avoids having to special case waitid in the syscall interface or with an
extra flag.
Add a check to ensure that any of these flags is set to avoid the now
possible case of nothing being specified. This fails with B_BAD_VALUE
(EINVAL) as on other systems.