Latest updates to Run-Time Checking dbx feature.

Run-Time Checking (RTC) feature of dbx, the Sun Studio debugger, seem to attract much attention. So I thought it is worth mentioning two important RTC-related bugfixes made in latest dbx patch.

String Functions

One problem can be seen by virtually everyone using RTC on Solaris 10. If your program uses libc.so string functions, such as strchr(), for example, dbx reports "read from unallocated" like this:
Read from unallocated (rua): 
Attempting to read 1 byte at address 0x24f6b
    which is just past heap block of size 19 bytes at 0x24f58
This block was allocated from:
        [1] _strdup() at 0xebd60fa0 
        [2] main() at line 9 in "strdup-test.c"
Location of error:
=>[1] strchr(0x24f68, 0x2c2c2c2c, 0x545e0144, 0x80808080, 0x1010101, 0x80808080), at 0xebd2e34c 
  [2] main(argc = 1, argv = 0xffbff824), line 11 in "strdup-test.c"

What is happening is that strchr(), as well as other string functions, have been optimized to work with whole words at a time which sometimes doesn't end on an even boundary and thus can overrun some memories by a small amount. See strchr implementation for an example. Dbx was made aware of that and does not report rua errors any more, but only if they are related to usage of the above algorithms. True errors are not hidden.

RTC error suppression

Second important fix is related to suppress command, which is handy when you need to focus on one RTC error and set aside the others. Under certain circumstances (when target loadobject was instrumented with traps), it didn't actually suppress anything and dbx output was flooded with RTC error reports, making it hard to debug the application.
With this patch, the error is gone and suppress should work as expected.

Комментарии:

Опубликовать комментарий:
  • HTML Syntax: Отключен
About

Articles, news, notes on dbx, the Sun Studio debugger and other stuff.

Search

Categories
Archives
« Апрель 2014
ПнВтСрЧтПтСбВс
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Сегодня