Source Activity

Syndicate content
Haiku's main repository
Updated: 1 min 40 sec ago

Add leak_analyser shell script to analyse guarded heap info.

Sat, 2015-04-11 07:24
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. 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.
Categories: Development

Make guarded heap accessible through its own libroot_guarded.so.

Sat, 2015-04-11 07:19
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. 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.
Categories: Development

Added gcc4 versions of cdrtools and BurnItNow (by luroh)

Sat, 2015-04-11 06:14
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. 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.
Categories: Development

Update translations from Pootle

Sat, 2015-04-11 04:26
Categories: Development

BBuffer: Unregister buffer when clone_area fail, fixes #6188.

Fri, 2015-04-10 17:47
Signed-off-by: Adrien Destugues Signed-off-by: Adrien Destugues
Categories: Development

malloc_debug: Implement allocation dump on exit in guarded heap.

Fri, 2015-04-10 15:04
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. 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.
Categories: Development

malloc_debug: Implement alloc/free stack traces in guarded heap.

Fri, 2015-04-10 14:28
When configured to do so (using heap_debug_set_stack_trace_depth(depth) or MALLOC_DEBUG=s) the guarded heap now captures stack traces on alloc and free. A crash due to hitting a guard page or an already freed page now dumps these stack traces. In the case of use-after-free one can therefore see both where the allocation was done and where it was freed. Note that there is a hardcoded maximum stack trace depth of 50 and that the alloc stack trace takes away space from the free stack trace which uses up the rest of that maximum. When configured to do so (using heap_debug_set_stack_trace_depth(depth) or MALLOC_DEBUG=s) the guarded heap now captures stack traces on alloc and free. A crash due to hitting a guard page or an already freed page now dumps these stack traces. In the case of use-after-free one can therefore see both where the allocation was done and where it was freed. Note that there is a hardcoded maximum stack trace depth of 50 and that the alloc stack trace takes away space from the free stack trace which uses up the rest of that maximum.
Categories: Development

Whitespace cleanup only.

Fri, 2015-04-10 14:10
Categories: Development

syscalls: Add get_stack_trace and lookup_symbol syscalls.

Fri, 2015-04-10 13:44
The get_stack_trace syscall generates a stack trace using the kernel debugging facilities and copies the resulting return address array to the preallocated buffer from userland. It is only possible to get a stack trace of the current thread. The lookup_symbol syscall can be used to look up the symbol and image name corresponding to an address. It can be used to resolve symbols from a stack trace generated by the get_stack_trace syscall. Only symbols of the current team can be looked up. Note that this uses the symbol lookup of the kernel debugger which does not support lookup of all symbols (static functions are missing for example). This is meant to be used in situations where more elaborate stack trace generation, like done in the userland debugging helpers, is not possible due to constraints. The get_stack_trace syscall generates a stack trace using the kernel debugging facilities and copies the resulting return address array to the preallocated buffer from userland. It is only possible to get a stack trace of the current thread. The lookup_symbol syscall can be used to look up the symbol and image name corresponding to an address. It can be used to resolve symbols from a stack trace generated by the get_stack_trace syscall. Only symbols of the current team can be looked up. Note that this uses the symbol lookup of the kernel debugger which does not support lookup of all symbols (static functions are missing for example). This is meant to be used in situations where more elaborate stack trace generation, like done in the userland debugging helpers, is not possible due to constraints.
Categories: Development

<input>keyboard: Fix use-after-free on dead key completion.

Fri, 2015-04-10 12:57
When completing a dead key the already freed string was used to build the input method changed notification. Use an ArrayDeleter to simplify management of the two strings. When completing a dead key the already freed string was used to build the input method changed notification. Use an ArrayDeleter to simplify management of the two strings.
Categories: Development

More whitespace cleanup all over the place.

Fri, 2015-04-10 12:57
Categories: Development

libroot: Fix typo in static variable name.

Fri, 2015-04-10 12:51
Categories: Development

Whitespace cleanup only.

Fri, 2015-04-10 12:40
Categories: Development

Correctly check when the BBuffer failed the registration with the server.

Thu, 2015-04-09 22:04
Signed-off-by: Adrien Destugues Signed-off-by: Adrien Destugues
Categories: Development

ShowImage: Multipage images displayed in sequence.

Thu, 2015-04-09 19:18
* The correct page is displayed. * Next/Previous/First/Last page are enabled and disable as Next/Previous File. * Add in the status bar current page/ total page. * Fixes #11959. * The correct page is displayed. * Next/Previous/First/Last page are enabled and disable as Next/Previous File. * Add in the status bar current page/ total page. * Fixes #11959.
Categories: Development