Commit Graph

53440 Commits

Author SHA1 Message Date
Adrien Destugues
8bbe44dd63 Add package for libmpeg2 2015-04-16 22:07:21 +02:00
Michael Lotz
56a63697ae notification_server: Don't remove the views from the layout.
Removing the view from the window and deleting it is fine. This is a
quick fix for #11976. The underlaying issue of how BLayout::RemoveView
should work still needs to be fixed.
2015-04-16 21:44:59 +02:00
Jessica Hamilton
c7ad68f08c assert.h: add comments explaining the omission of include guards 2015-04-17 07:03:40 +12:00
Jessica Hamilton
e4de39c4e4 libs/bsd: also define _BSD_SOURCE for C files 2015-04-16 23:40:23 +12:00
Jessica Hamilton
9f17027980 assert.h: remove include guards
* including assert.h multiple times with NDEBUG varying is
  perfectly legal, and required by POSIX.
2015-04-16 23:03:40 +12:00
Adrien Destugues
091a80aeed Protect all BSD extensions with _BSD_SOURCE
* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.
2015-04-16 07:33:06 +02:00
Automatic Committer
e2ceb857d4 Update pci.ids from pciids.sourceforge.net 2015-04-16 05:20:26 +02:00
Michael Lotz
b598325acc BView: Move tooltip release and fix small coding style issues.
This is only an optical change.
2015-04-15 00:34:09 +02:00
Michael Lotz
e837ee8bc6 BView: Fix destruction order of layout items.
Because of the virtual hooks a BLayout must never be destroyed while it
still has layout items. If these items are only removed from the layout
in its destructor, the subclass version of hooks like ItemRemoved() are
not called anymore. This lead to leaks because many BLayout subclasses
use the ItemRemoved() hook to clean up associated data (as is suggested
explicitly in the BLayout documentation).

In the same line of thought, a BLayoutItem must never be deleted when it
is still attached to a layout, as it similarly has virtual hooks like
DetachedFromLayout() that can not be called at this point anymore.

The destructors of BLayout and BLayoutItem now have debugger calls in
case these conditions are not met which should help to avoid
accidentally introducing such hard to debug issues.

To ensure the correct destruction order the sequence is now:

* Destroy the child views first. This cleans up their layout items while
  the layout tree is still intact.
* Unset the view layout before removing layout items so it can properly
  detach from the layout instead of just deleting it.
2015-04-15 00:34:07 +02:00
Michael Lotz
0cc8c71bba BLayoutItem: Add RemoveSelf() convenience method.
It works analoguous to BView::RemoveSelf(), i.e. it removes itself from
the parent (layout in this case) and returns whether or not it had and
was successfully removed from said parent.
2015-04-15 00:34:05 +02:00
Michael Lotz
19bb9ef937 BView: Remove old TODO comment.
The BShelf is not owned by the BView (nor the BWindow for that matter)
and so must not be deleted on destruction.
2015-04-15 00:34:04 +02:00
Michael Lotz
32e627a7fb BTwoDimensionalLayout: Fix leak of CompoundLayouter layout[er]. 2015-04-15 00:32:54 +02:00
Michael Lotz
814393e641 BGridLayout: Fix leak of grid. 2015-04-15 00:30:57 +02:00
Michael Lotz
4198ccecf3 Whitespace cleanup only. 2015-04-15 00:30:56 +02:00
Michael Lotz
0bba9b9752 Fix some typos and whitespace in BLayout docs. 2015-04-15 00:30:55 +02:00
Adrien Destugues
83571947d1 Set the corret ID when unregistering the buffer.
Follow-up fix to hrev49035.
2015-04-14 07:19:56 +02:00
Rene Gollent
2e82cb8dd6 x86: Update BePDF, Pe,Vision packages. Add libsanta package. 2015-04-13 22:28:32 -04:00
Janus
3000afd7b1 ShowImage: Remember save location
* Fixes #6766.
2015-04-13 20:08:58 +00:00
Dario Casalinuovo
384ae40aa5 Correctly check when the BBuffer failed the registration with the server.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:22:26 +02:00
Dario Casalinuovo
4232706dc8 Clean SharedBufferList.h.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:21:35 +02:00
Dario Casalinuovo
8290e8d3e5 BBuffer: Unregister buffer when clone_area fail, fixes #6188.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:20:43 +02:00
Dario Casalinuovo
edcc37c64a ProcessController and VolumeControl: solve BMessage kind of memory leak.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:18:12 +02:00
Dario Casalinuovo
0fc30d8934 Deskbar: Sanitize the usage of BMessage
... especially for SendMessage and SendReply.
* Delete the item's message if AddItem does not return successfully.
* Fixes #11934.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:11:45 +02:00
Dario Casalinuovo
9e11c3adb1 Deskbar: No need to use dynamic allocation, remove unused headers.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-04-13 19:10:38 +02:00
Alexander von Gluck IV
c0af54cc3b cubieboard4: Update SPL bin url to official source
* Our pull request was accepted
2015-04-13 09:15:38 -05:00
Michael Lotz
9bf9ee3806 Whitespace and style cleanup only. 2015-04-12 18:50:01 +02:00
Michael Lotz
d66114bece network stack: Copy right amount of data from request buffer.
The full size of the entry, including the size of the following
addresses, was used when copying the request instead of just the request
buffer size. Also clear the request buffer to 0 as not all of it is
otherwise initialized.
2015-04-12 18:50:01 +02:00
Michael Lotz
3b7b927dd0 libbnetapi: Add BNetworkRoute to replace use of route_entry.
The BNetworkRoute class manages a route_entry and the sockaddr's
associated with it. It replaces the direct use of route_entry in the
BNetworkInterface API.

Using route_entry is fragile and inconvenient as it only holds pointers
to the sockaddr's. When getting a list of routes from the kernel, each
route_entry is set up so that its pointers point into the single flat
buffer that is passed around. Creating a copy of the route_entry and
then deleting the flat buffer makes the pointers in the copy stale.
Returning these route entries therefore always lead to a use-after-free
when they were eventually used.

BNetworkRoute also takes over the code and functionallity of getting
routes from RouteSupport. The corresponding method in BNetworkRoster is
replaced by a static method in BNetworkRoute.

Also distinguish between the default route and gateway of an interface.
GetDefaultRoute() now gets the default BNetworkRoute for the interface
while GetDefaultGateway() gets the associated gateway address within
that default route. Adjust network preferences panel to this change.

Note that we currently only seem to have per interface default routes
and not an actual global default route. This was already the case before
these changes and I did not further investigate what this means.
2015-04-12 18:50:00 +02:00
PulkoMandy
7d82b5d4ab arm/mmu: Fix boot on beagle-xm
* The changes for pi2 support led to the virtual addresses overlapping
with the page table again on the beagle, because the kernel address
space overlaps with the physical RAM identity mapped. Try to find a
memory range in a way that will work in both cases.
2015-04-12 17:52:24 +02:00
Alexander von Gluck IV
9c5e234cb3 arm: Initial Cubieboard4 work
* SD cards are "blessed" with a boot0 spl and boot1 u-boot
  at fixed locations.
* Allwinner's u-boot is lacking a lot.
* Upstream u-boot should be better at some point. WIP:
  http://lists.denx.de/pipermail/u-boot/2015-January/201537.html
2015-04-11 16:53:04 -05:00
Michael Lotz
97ebc043a6 Remove empty file probably accidentally added in hrev47198. 2015-04-11 23:37:55 +02:00
Michael Lotz
8f9d4cad45 syscalls: Remove get_stack_trace syscall again.
This reverts the other half of b959d46dbd.
2015-04-11 23:37:55 +02:00
Michael Lotz
3dfbe1a12d guarded_heap: Use __arch_get_stack_trace() instead of syscall.
The stack base and end addresses are stored in TLS slots that are
prepared when enabling stack traces and filled in lazily on use for
each thread. This avoids the need of calling get_thread_info to get
these values.

Also simplifies the code somewhat due to proper frame skipping support.
2015-04-11 23:37:54 +02:00
Michael Lotz
c012e7e930 libroot: Add private __arch_get_stack_trace().
It can be used to get a stack trace of the current thread. Note that
this works by walking frame pointers and will not produce anything
useful if an application is compiled with the frame pointers omitted.

The stack base and end addresses have to be provided as arguments and
are used to check that the frame pointers fall within that range. These
values are thread specific and can be retrieved with get_thread_info().
No other sanity checks (like checking for loops in the linked list) are
done.

This is a simplified rewrite of the stack trace code from the kernel
debugger.

As this code is common to x86 and x86_64 but is not generic across
architectures I introduced x86_common as a directory to put such
sources.
2015-04-11 23:37:54 +02:00
Michael Lotz
9ac1c4c25e libicon: Fix leak of Icon::Gradient.
This was most prominently visible in applications that show a lot of
icons like Tracker and Deskbar.
2015-04-11 14:55:11 +02:00
Michael Lotz
abed891d1b Shortcuts: Fix use-after-free in EditWindow return.
Calling Quit() on the window deletes it, so using the fTextControl
member to get the result does not work.
2015-04-11 13:39:33 +02:00
Michael Lotz
827f11e986 Whitespace cleanup only. 2015-04-11 13:37:28 +02:00
Michael Lotz
268bbb1f8c AboutSystem: Fix leak of package credits. 2015-04-11 13:34:30 +02:00
Michael Lotz
459e651fd5 syscalls: Remove lookup_symbol syscall again.
This partially reverts b959d46dbd.
2015-04-11 11:18:51 +02:00
Michael Lotz
bd5dea318a guarded_heap: Replace symbol lookup syscall with runtime_loader.
Use the private runtime_loader API to do the symbol lookup instead of
using the syscall.
2015-04-11 11:18:51 +02:00
Michael Lotz
ebdc1d480e runtime_loader: Add imageName and exactMatch to symbol lookup.
Extend the get_nearest_symbol_at_address() private runtime_loader
export to include imageName and exactMatch arguments.

The imageName holds the SONAME of the image, if available, so cannot
neccessarily be extracted from the image path.

Whether or not there was an exact match, i.e. the symbol with its size
contains the address, is now returned in exactMatch.
2015-04-11 11:18:50 +02:00
Humdinger
215756b065 Added FilWip package. 2015-04-11 10:40:43 +02:00
Humdinger
7c6a5b81aa Added gcc4 versions of cdrtools and BurnItNow (by luroh)
luroh was so kind to compile those for gcc4. cdrtools don't build on x86_64,
so there's no reason provide a 64bit BurnItNow version either.
Corrected name of gcc2 source package of burnitnow.
2015-04-11 10:31:45 +02:00
Michael Lotz
6900f36727 Add leak_analyser shell script to analyse guarded heap info.
The script runs the guarded heap allocation output through c++filt to
demangle stack trace symbols and filters out a list of known globals
that are never freed. It also allows to exclude further patterns
provided on the command line.
2015-04-11 09:41:25 +02:00
Michael Lotz
0cf3d62115 Make guarded heap accessible through its own libroot_guarded.so.
This adds libroot_guarded.so to the HaikuDevel package. It is the same
as libroot_debug with the debug heap swapped out for the guarded heap.
The guarded heap has some useful features that make it desirable to use
while having the disadvantage of a large memory and address space
overhead which make it unusable in some situations. Therefore the
guarded heap cannot simply replace the debug heap but should still be
made available. As the heap init needs to happen even before having
environment variables, the heap to use can not be chosen dynamically.
Exposing them through their own libraries is the next best thing.
2015-04-11 09:41:25 +02:00
autonielx
1a704d4de9 Update translations from Pootle 2015-04-11 06:27:18 +02:00
Michael Lotz
74c284545b malloc_debug: Remove condition that is always true. 2015-04-10 17:11:56 +02:00
Michael Lotz
ec0190adb0 malloc_debug: Implement allocation dump on exit in guarded heap.
When enabled (using heap_debug_dump_allocations_on_exit(true) or
MALLOC_DEBUG=e) this causes a dump of all remaining allocations when
libroot_debug is unloaded. It uses terminate_after to be called as
late as possible.

When combined with alloc stack traces this makes for a nice if a bit
crude leak checker. Note that a lot of allocations usually remain
even at that stage due to statically, lazyly and globally allocated
stuff from the various system libraries where it isn't necessarily
worth the overhead to free them when the program terminates anyway.
2015-04-10 17:04:28 +02:00
Michael Lotz
e26a4e7b7a malloc_debug: Also print stack traces when dumping guarded heap. 2015-04-10 16:49:02 +02:00
Michael Lotz
607ac916de malloc_debug: Impl. heap_debug_dump_allocations in guarded heap. 2015-04-10 16:42:29 +02:00