Changes between Version 2 and Version 3 of zzuf/internals
- Timestamp:
- 11/22/2009 06:47:48 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
zzuf/internals
v2 v3 59 59 == Memory functions == 60 60 61 Memory handling functions are diverted in [source:/zzuf/trunk/src/lib-mem.c]. 62 61 63 Functions such as '''`malloc`''' need to be diverted by zzuf in order to monitor global memory usage and detect severe memory leaks. 62 64 63 65 This creates a bootstrapping problem on some platforms: the diverted '''`calloc`''' calls the real '''`calloc`''', which needs to be loaded using '''`dlsym`'''. On Linux, '''`dlsym`''' calls '''`calloc`''', resulting in an infinite loop. To avoid this, we declare a private static buffer that memory allocation functions can use if the original function is not yet loaded. 64 66 67 == Signal functions == 68 69 Memory handling functions are diverted in [source:/zzuf/trunk/src/lib-signal.c]. 70 71 These functions need to be diverted to prevent the fuzzed application from intercepting fatal signals such as '''`SIGSEGV`'''. 72 73 == File and socket functions == 74 75 File descriptor handling functions are diverted in [source:/zzuf/trunk/src/lib-fd.c] and [source:/zzuf/trunk/src/lib-stream.c]. 76 77 The most important part of zzuf is the way file descriptor functions are diverted. It keeps track of all open file descriptors, decides whether to fuzz their data, and makes diverted reading functions behave accordingly. 78 65 79 === Standard file descriptor functions === 66 80 67 81 === `FILE *` functions === 68