File: TODO

package info (click to toggle)
libdebug 0.5.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 252 kB
  • sloc: ansic: 1,194; makefile: 128
file content (53 lines) | stat: -rw-r--r-- 1,301 bytes parent folder | download | duplicates (6)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

log.c
-----

* automatically scale up/down log levels when messages are
  being logged too fast

    LOG_VERBOSE: foo
    .
    .
    .
    LOG_VERBOSE: bar
    LOG_WARNING: Flood detected: Scaling down log level to LOG_WARNING
    .
    .
    .
    LOG_WARNING: Restoring log level: LOG_VERBOSE

* add locking

* make it work correctly, whether O_NONBLOCK or not

* make log a daemon

memory.c
--------

* add a function to check for leaks at any given time
* don't print junk after fail kicks in (only first error message)

other
-----

* file descriptor leak detection

* make a fail module with callbacks that is called whenever something
  fails. these callbacks can be registered any time and also removed.

* fail should have void * parameter so that fail can take arguments

* implement stack trace function

* use Felix's suggestion:

       > Even better would be if you could somehow substitute malloc() with your own
       > version, so that if someone calls malloc() it actually calls
       > some_malloc_wrapper() which in turn calls the original malloc() function.
       > That way you can trap usage in the C library itself as well (e.g. if someone
       > uses strdup())

       You can actually do the latter.  Your wrapper would be named malloc and
       call __libc_malloc.