Stefano Ceccherini
d0397c5424
don't leak the BMessengers. CID 1009 and 1010
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27742 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27742
2008-09-25 14:03:25 +00:00
Stefano Ceccherini
e32494d24f
Check for NULL before dereferencing the pointer. CID 1050
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27741 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27741
2008-09-25 13:56:50 +00:00
François Revol
717326c223
Add missing api_version.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27740 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27740
2008-09-25 13:18:22 +00:00
Stefano Ceccherini
02de38b077
Fixed leaks. CID 893 and 894. There are still some leaks in this file, but the code is too complex and I won't touch it. I'd feel better if someone who knows it better would have a look
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27739 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27739
2008-09-25 13:12:19 +00:00
Ingo Weinhold
8ddfb2fdb5
Should fix problems with whitespace in path names ( #2770 ).
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27738 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27738
2008-09-25 12:41:36 +00:00
Stefano Ceccherini
7483a2666e
fixed leaks. CID 906 and 907
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27737 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27737
2008-09-25 12:12:59 +00:00
Stefano Ceccherini
d556a216cf
delete the str array in any case, although if numBytes <= 0, the array woulnd't have been allocated. CID 882.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27736 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27736
2008-09-25 12:06:32 +00:00
Stefano Ceccherini
0f85a3eb5b
renamed field variables to fit our guidelines. Also use sem_id instead of long
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27735 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27735
2008-09-25 12:00:03 +00:00
Stefano Ceccherini
68fba17fe7
style changes
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27734 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27734
2008-09-25 11:55:00 +00:00
Stefano Ceccherini
bdee0a3f6d
Don't leak the BMessenger (CID 880)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27733 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27733
2008-09-25 11:49:25 +00:00
Ingo Weinhold
5def543d91
Insert the application image at the head of the list. Work-around for
...
code (like found in Firefox) that relies on get_next_image_info() to
return it first.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27732 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27732
2008-09-25 11:47:12 +00:00
Stefano Ceccherini
657a3676f9
don't leak the BMessenger. CID 884
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27731 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27731
2008-09-25 10:39:48 +00:00
Stefano Ceccherini
cd83a15bde
BFilePanel doesn't take ownership of the passed entry_ref. That code wouldn't have worked anyway, since FindRef() returns B_OK on success. CID 933
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27730 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27730
2008-09-25 10:31:31 +00:00
Stefano Ceccherini
2ad68d466a
don't leak the BMessenger. CID 928 and 929
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27729 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27729
2008-09-25 10:11:20 +00:00
Stefano Ceccherini
c404bd0e22
BFilePanel makes a copy of the passed messenger
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27728 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27728
2008-09-25 10:08:04 +00:00
Stefano Ceccherini
1c35c27bec
renamed static variable to have the s prefix
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27727 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27727
2008-09-25 07:39:28 +00:00
Stefano Ceccherini
7696317d06
Style changes
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27726 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27726
2008-09-25 07:37:23 +00:00
Stefano Ceccherini
97c7b4da99
minWidth could be used uninitialized. CID 1150
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27725 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27725
2008-09-25 07:31:48 +00:00
Stefano Ceccherini
e7d2f0f0e8
fix the problem reported in the TODO by using a reference to pointer
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27724 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27724
2008-09-25 06:12:02 +00:00
Ingo Weinhold
07865c4022
Fixed check whether an address is contained in an image. Address + size
...
does overflow when the image ends at the end of the address space (like
the commpage).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27723 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27723
2008-09-24 14:47:05 +00:00
Ingo Weinhold
8a85be4636
Register the commpage as an image and its entries as symbols.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27722 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27722
2008-09-24 14:41:42 +00:00
Ingo Weinhold
fec47a5702
Added functions elf_create_memory_image() and
...
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27721
2008-09-24 14:40:24 +00:00
Stefano Ceccherini
727834785d
Added a TODO explaining why BGameSoundDevice::Buffer() is broken. Small style changes
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27720 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27720
2008-09-24 12:55:25 +00:00
Axel Dörfler
619780e1be
* Patch by tqh from ticket #2761 that adds max_hdr, and puts some extra
...
parenthesis around the mtod() definition.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27719 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27719
2008-09-24 07:33:03 +00:00
Ingo Weinhold
8cc146385f
Use the new <asm_defs.h> header in x86 assembly files. Particularly
...
added FUNCTION_END() calls for a good deal of functions. The respective
ELF symbols do now have a correct size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27718 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27718
2008-09-23 22:50:30 +00:00
Ingo Weinhold
4069a00744
Header containing macro definitions used in various assembly sources.
...
I'm not happy with the location, but I didn't see any better one in the
header tree.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27717 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27717
2008-09-23 22:46:07 +00:00
Ingo Weinhold
a6d671fc8e
The variable_stack_depth field in the profiler update message was not
...
set correctly. Could cause "profile" to crash.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27716 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27716
2008-09-23 22:43:40 +00:00
Ingo Weinhold
52d0d5e53e
elf_load_user_image() does now register the loaded image. That is every
...
team does have a runtime loader image. The "profile" tool can thus
translate addresses in the runtime loader correctly.
Note that this change will break code that assumes that the application
image is the first image returned by get_next_image_info().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27715 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27715
2008-09-23 21:13:38 +00:00
Ingo Weinhold
95d4a71d89
Rather use MAP_PRIVATE instead of MAP_SHARED. It doesn't make a
...
difference ATM, but will, when we change the semantics of MAP_PRIVATE to
imply MAP_COPY.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27714 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27714
2008-09-23 20:34:45 +00:00
Ingo Weinhold
5181b35bee
Introduced a separate flag for indicating that disable_debugger() had
...
been called for a team, and fail installing the default debugger if it
is set. This makes disable_debugger() actually work. Fixes bug #2763 .
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27713 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27713
2008-09-23 20:17:58 +00:00
Ingo Weinhold
e9c4d47ad7
Added command line option "-d" to disable the debugger before crashing.
...
Shows that disable_debugger() isn't working ATM.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27712 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27712
2008-09-23 19:54:12 +00:00
Michael Lotz
a6277def2a
CID 1156 complained that this was an uninitialized variable, though it was
...
merely a completely unneccessary one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27711 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27711
2008-09-23 19:13:01 +00:00
Michael Lotz
0b559106bf
* Only copy over the list content if resizing/allocating the list succeded.
...
Fixes CID 1268.
* Remove no more correct comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27710 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27710
2008-09-23 19:07:13 +00:00
Rudolf Cornelissen
42dfe402c0
got the meaning of configure_dma()'s return value wrong. It respected the failsafe boot option after all. fixed plus few added dprintf() messages to see what's happening. Sorry for the fault. Searching more for the real problem..
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27709 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27709
2008-09-23 19:02:51 +00:00
Stefano Ceccherini
250505c99b
more small style changes
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27708 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27708
2008-09-23 15:38:32 +00:00
Stefano Ceccherini
92ed85c9ec
use nothrow for allocation
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27707 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27707
2008-09-23 12:41:42 +00:00
Stefano Ceccherini
671fe092d3
Added missing break(s) in switch block in GameSoundBuffer::GetAttributes(). Added missing default case. Avoid double calculation of buffer size
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27706 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27706
2008-09-23 12:28:18 +00:00
Stefano Ceccherini
3beb2f72d7
style changes. Also added a TODO taken from a comment in bug #575
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27705 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27705
2008-09-23 11:02:58 +00:00
Stefano Ceccherini
0e79ce1ebc
Style changes. don't use new to allocate a 2-sized buffer, but use the stack
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27704 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27704
2008-09-23 10:43:02 +00:00
Stefano Ceccherini
c9e6288649
Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27703
2008-09-23 09:52:45 +00:00
Axel Dörfler
08facac73e
* Fix for a "error values are positive" assumption in the RTL-8139 driver.
...
This should enable internal MII PHY detection again, thanks to Siarzhuk for
finding this!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27702 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27702
2008-09-23 08:49:16 +00:00
Stefano Ceccherini
2d4df7f2fc
CID 80. err was checked twice for the same value. Also add more error checks
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27701 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27701
2008-09-23 08:33:09 +00:00
Stefano Ceccherini
b0acb3febf
Don't leak the BMediaFile. CID 5
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27700 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27700
2008-09-23 08:14:07 +00:00
Ingo Weinhold
0135e2e324
* Increased the maximum profiling caller stack depth significantly.
...
* Extended the profiling API by an option to record a variable number of
samples per tick. The stack depth is used as a maximum.
* Added new option "-f" to the "profile" tool. When specified it
increments the hit counts of all symbols in the full available caller
stack. I.e. the resulting hit counts will approximate the total time
spent in each function or any function directly or indirectly called
by it. Thus "_start" and "main" will usually get 100% and leaf
functions only what time has actually been spent in them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27699 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27699
2008-09-23 01:08:27 +00:00
Ingo Weinhold
114c07e6e2
Overdue copyright update.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27698 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27698
2008-09-22 23:17:48 +00:00
Ingo Weinhold
ab30ce0e84
* Removed obsolete B_DEBUG_MAX_PROFILE_FUNCTIONS.
...
* Relaxed the stack depth and profiling interval limits a bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27697 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27697
2008-09-22 23:03:25 +00:00
Michael Lotz
56c05e04af
Actually only allow bytes per row > 0 or B_ANY_BYTES_PER_ROW. Still we don't
...
actually handle other invalid bpr values like if the width doesn't really fit
into the provided bytes per row for example.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27696 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27696
2008-09-22 19:42:35 +00:00
Michael Lotz
f8b51708a6
In case there is no error field in the reply message, make sure that we don't
...
continue with B_OK. This also fixes CID 1122 where in such a case an
uninitialized token would be returned.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27695 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27695
2008-09-22 18:15:50 +00:00
Michael Lotz
dde69daea3
Also close the input file in case of success. Fixes CID 935.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27694 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27694
2008-09-22 18:08:00 +00:00
Michael Lotz
e2891a435a
Don't leak the argv array that is passed to ArgvReceivedEx(). Its contents
...
are only used to open supplied files by name, it doesn't take ownership.
Fixes CID 934.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27693 a95241bf-73f2-0310-859d-f6bbb57e9c96
hrev27693
2008-09-22 18:03:39 +00:00