Fix use-after-free
[platform/upstream/ltrace.git] / NEWS
1 -*-org-*-
2 * Version 0.8.0
3 ** Prototype libraries
4    - Each DSO can now ship an ltrace config file (called prototype
5      library) that ltrace will open when that DSO is loaded to process
6      image.  See ltrace(1) for details.
7
8    - ltrace.conf is no longer part of installation tarball.  Instead,
9      we now ship libc.so.conf, libm.so.conf, libacl.so.conf, and
10      syscalls.conf.  Those are now istalled to /usr/share/ltrace by
11      default.  /etc/ltrace.conf and $HOME/.ltrace.conf are still
12      loaded if present, and can contain arbitrary user configuration.
13
14    - The option -F was retrofitted to be a colon-separated list of
15      prototype libraries, and directories to look for prototype
16      libraries in.  On Linux, ltrace looks into XDG_CONFIG_HOME,
17      XDG_CONFIG_DIRS, and /usr/share/ltrace as well.
18
19 ** Architectural support
20    - MIPS and MIPSel are now handled by the same backend.
21    - ARMv6 and ARMv7 are supported, including full fetch backend.
22    - Imagination Technologies Meta is now supported.
23    - On Linux, tracing of IFUNC symbols is supported.  On i386 and
24      x86_64, IRELATIVE PLT slots are traced as well.
25
26 ** -w output now shows full library path
27     The output format is similar to glibc's backtrace_symbols, e.g.:
28      > /bin/ls(_init+0x19be) [0x40398e]
29      > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f50cbc3676d]
30      > /bin/ls(_init+0x25fd) [0x4045cd]
31
32 * Version 0.7.3 [2013-09-15 Sun]
33 ** Bugfixes
34 *** [MIPS] Fix build on mips big endian
35     This bug caused messages like:
36     | Making all in mips
37     | /bin/sh: line 17: cd: mips: No such file or directory
38 *** [MIPS] Fix SIGSEGV on mips big endian
39     This bug caused runtime messages like:
40     | [0x4000000] --- SIGSEGV (Segmentation fault) ---
41     | [0xffffffff] +++ killed by SIGSEGV +++
42 *** Fix build with CLANG on FREEBSD
43
44 * Version 0.7.2 [2012-12-07 Fri]
45 ** Bugfixes
46 *** (Again) detect VDSO entry in r_debug linkmap with non-empty name
47     This bug caused messages like:
48     | Couldn't determine base address of linux-vdso32.so.1
49     | Couldn't load ELF object linux-vdso32.so.1: No such file or directory
50 *** Fix building with libunwind 1.1
51 *** Fix prototype lookup for -x symbols from shared libraries
52     Ltrace was unable to find prototypes of static symbols in shared
53     libraries.  It changed the symbol name internally to the form
54     name@libfoo.so.  Thus mangled, symbols were not found in config
55     files.
56
57 * Version 0.7.1 [2012-11-29 Thu]
58 ** Bugfixes
59 *** ltrace.conf.5 is now installed to man5 as it should be
60 *** [PowerPC] A header file necessary for building is now shipped
61 *** [MIPS] Work around duplicate symbol request bug
62     This fixes the ltrace abort:
63     | ./ltrace: proc.c: 755: breakpoint_for_symbol: Assertion `bp->libsym == ((void *)0)' failed.
64
65 *** Detect VDSO entry in r_debug linkmap with non-empty name
66     This bug caused messages like:
67     | Couldn't determine base address of linux-vdso32.so.1
68     | Couldn't load ELF object linux-vdso32.so.1: No such file or directory
69
70 *** Temporary files are wiped properly after the test suite has been run
71 *** Parsing typedefs with common prefix now works as it should
72     More exactly, if there were typedefs X and XY (in this order), and
73     a reference was made to X, ltrace would match XY instead.
74
75 ** Cofiguration Files
76 *** The following prototypes in ltrace.conf were added or updated
77     __ctype_get_mb_cur_max, __endmntent, __getmntent_r, __setmntent,
78     a64l, abort, abs, addmntent, getmntent_r, hasmntopt, inet_addr,
79     inet_aton, inet_lnaof, inet_makeaddr, inet_netof, inet_network,
80     inet_ntoa, kill, l64a, labs, memcpy, memmove, setlocale,
81     sigaction, sigaddset, sigandset, sigdelset, sigemptyset,
82     sigfillset, sigisemptyset, sigismember, signal, sigorset,
83     sigpending, sigprocmask, sigsuspend.
84
85 *** Duplicate typedefs are now guarded against
86 *** It's now possible to define recursive structures
87     Please read ltrace.conf(5) man page, chapter "recursive
88     structures", to learn about this new feature.
89
90 *** New lens "bitvec" is available
91     This allows displaying various data types as bit vectors.  Please
92     read ltrace.conf(5) to learn more.
93
94 *** Octal lens renamed to "oct"
95     For reasons of consistency with "hex".  "octal" is still valid and
96     will be for forseeable future.
97
98 *** The hex lens can now format floating point arguments
99
100 * Version 0.7.0 [2012-11-09 Fri]
101 ** Tracing
102 *** Full support for tracing multi-threaded processes
103
104     Ltrace now understands thread groups, and it stops all threads
105     before manipulating breakpoints.  The downside is that performance
106     of multi-threaded processes is rather bad, because handling any
107     event implies stopping the whole job.  The upside is that
108     individual threads don't get random SIGILL's and SIGSEGV's and
109     events are not missed.
110
111 *** Support for tracing inter-library calls
112
113     -e and -x were extended to allow library selectors.  See the man
114     page for details.
115
116 *** Better support for parameter passing ("fetch backend")
117
118     This version brings more complete support for parameter passing,
119     including passing structures in registers, passing double on i386,
120     and other edge cases that were not handled correctly before.  The
121     following architectures now have implementation of fetch backend:
122     i386, x86_64, ppc, ppc64, ia64, s390, s390x, m68k.
123
124 *** Awareness of deny_ptrace SELinux boolean
125
126     The deny_ptrace boolean denies all processes from being able to
127     use ptrace to manipulate other processes.  Ltrace now understands
128     that this boolean exists, and recommends turning it off, if it is
129     on and ltrace fails to attach to a process.
130
131 *** Limited support for tracing returns from tail call functions
132 *** -e, -x and -l selectors now allow using globs and regular expressions
133
134     See the man page for details of the selector syntax.  This changes
135     the way -x and -l behave with respect to tracing libraries opened
136     by dlopen:
137
138     - In 0.6.0, only those -x symbols that were unmatched in main
139       binary were used to search through symbol table of libraries
140       opened with dlopen.  In 0.7.0, -x and -e are applied uniformly
141       to each mapped binary: the main binary, dependent DSO's, and any
142       dlopened libraries.
143
144     - In 0.6.0, -l argument was a filename to open and inspect.  In
145       0.7.0, -l is a glob expression matched against each mapped
146       binary.
147
148 *** -g command line option dropped
149
150     This option was introduced in 0.6.0 with the meaning identical to
151     -L, which should be used instead.
152
153 *** Test suite can now be run under valgrind
154
155     Use --enable-valgrind to turn this on.
156
157 *** [ppc] Support both BSS and secure PLTs for 32-bit processes
158 *** [mips] Implement software singlestepping
159 *** [mips] Add support for CPIC main programs
160 *** Support tracing PIE binaries
161
162 ** Configuration Files
163
164 *** New abstraction: parameter pack
165
166     Parameter packs describe zero or more of actual arguments, whose
167     type can be determined in runtime.  The only parameter pack
168     currently implemented is "format" for decoding printf-style format
169     strings.
170
171     In future, it should be relatively straightforward to add more
172     parameter packs for functions like execl, and others.
173
174 *** New expression: zero
175
176     When used in array length expressions, it means "this array ends
177     at the first element with zero value".  C strings are essentially
178     array(char, zero)*.
179
180 *** Lenses: change the way that underlying type is rendered
181
182     Lenses are used similarly to parametrized types, e.g.:
183     | void func(lens(int)); |
184
185 **** octal
186
187      "octal", which used to be a separate type, is now lens, which can
188      be used to render any underlying type in base 8.  Plain "octal"
189      is still valid and means the same thing as "octal(int)".
190
191 **** hex, hide, bool
192
193      Similarly, "hex" lens was introduced to format as base 16.
194      "hide" was introduced to conceal given argument.  "bool" lens was
195      added to format objects as either true, or false.
196
197 **** enum
198
199      "enum" became lens as well.  Because enum already uses
200      parentheses to denote the list of enumeration values, the
201      underlying type is selected by square brackets:
202
203      | void func(enum[short](RED,GREEN,BLUE)); |
204
205 **** string
206
207      "string" was also turned to lens.  The argument can be either a
208      char*, or pointer to array of char, or array of char.  The latter
209      is useful in cases like the following:
210
211      | void func_struct_2(struct(string(array(char, 6)))); |
212
213 *** Misspelling of "int" as "itn" temporarily accepted, but deprecated
214
215     Pre-0.7 ltrace shipped a buggy version of ltrace.conf that
216     contained the following prototype:
217
218     | itn acl_valid(addr); |
219
220     To support extant versions of ltrace.conf, that use is now
221     considered valid, and "itn" is a synonym of "int".  It is however
222     deprecated, and will produce a warning in future.
223
224 *** Using void as top-level function argument now deprecated
225
226     Functions that take no arguments shouldn't pretend to take one
227     parameter of void type.  For example the following:
228
229     | int fork(void); |
230
231     ... should be declared like this:
232
233     | int fork(); |
234
235     To support extant versions of ltrace.conf, that use is now
236     considered valid.  It is however deprecated, and will produce a
237     warning in future.
238
239 *** Using void to hide one argument is now obsolete
240
241     Ltrace needs to know the exact underlying type to decide what the
242     calling convention is.  The use of void to mean "hide this
243     argument", such as the following example, is therefore obsolete:
244
245     | void func(void, array(int, arg1)); |
246
247     Instead, rewrite the prototype depending on the exact underlying
248     type:
249
250     | void func(hide(int), array(int, arg1));  |
251     | void func(hide(long), array(int, arg1)); |
252
253     To support extant versions of ltrace.conf, this use is still
254     accepted, and "void" is taken to mean "hide(int)".  It is however
255     obsolete, produces a warning, and will be removed in future.
256
257 ** Documentation
258
259 *** New manual page ltrace.conf(5)
260 *** README, INSTALL brought up to date
261 *** New file CREDITS with a list of contributors
262
263 ** Bugfixes
264
265 *** Fix detaching from a process
266
267     Earlier, a process that ltrace detached from would sometimes die
268     of SIGSEGV, SIGTRAP, or SIGILL.  These were caused by ltrace
269     detaching from the process just after that process hit a
270     breakpoint.  Program counter would thus be left pointing
271     mid-instruction, or signals would be left pending.
272
273 *** Argument to -n is now checked for validity
274 *** Fix tracing across exec in a stripped binary
275 *** [x86] ORIG_RAX/ORIG_EAX may not contain original syscall number
276
277     In cases where the system call shouldn't be restarted, these are
278     set to -1.  In that case assume that the return is from the
279     topmost syscall.  This gets rid of some "unexpected breakpoint"
280     messages on x86_64 and i386.
281
282 *** [ppc] Fix races in tracing -e events in 64-bit processes
283
284     On ppc, the contents of PLT table change after the first call.
285     Ltrace used to handle this by reinserting the (now overwritten)
286     breakpoint after the function returns.  This introduced a window
287     where calls to the same function from the same binary (either a
288     recursive calls, or calls from another thread) weren't traced.
289     This is fixed as of 0.7.0.
290
291     As a side effect, events requested via -e now only hit when a PLT
292     call is made, which is consistent with other architectures.
293
294 *** [ppc] Allow stepping over lwarx instruction
295
296 ** Known bugs
297
298 *** [arm] Tracing is not supported at all on ARM
299
300     ltrace might work on older kernels, but no attempt was made to
301     fully support it.  Newer kernels don't support PTRACE_SINGLESTEP,
302     which ltrace depends on.  Before singlestepping is implemented in
303     software, ARM is considered unsupported.
304
305 * Version 0.6.0 [2011-01-06 Thu]
306
307 ** General Features
308
309 *** Use autotools for building
310 *** New option -b: disables output of signals received by the tracee
311 *** New option -w: print stack trace of events
312
313     Pass --with-libunwind to configure to enable the feature.  This
314     requires libunwind.
315
316 *** Support tracing of symbols from libraries opened with dlopen
317
318     These symbols are selected by -x.
319
320 ** Architecture-specific Changes
321
322 *** Various fixes for MIPS and PowerPC
323 *** Support for ARM Thumb mode
324 *** Implement fetching of 5th and further function arguments on s390
325 *** Support fork/exec syscalls on 31-bit s390
326 *** Support for float and double arguments on x86_64
327 *** Fixes for return arguments (after '+') in nested calls on x86_64
328
329 * License
330 -------------------------------------------------------------------------------
331 Copyright (C) 2012,2013 Petr Machata <pmachata@redhat.com>
332 This file is part of ltrace.
333
334 ltrace is free software; you can redistribute it and/or modify it
335 under the terms of the GNU General Public License as published by the
336 Free Software Foundation; either version 2 of the License, or (at your
337 option) any later version.
338
339 ltrace is distributed in the hope that it will be useful, but WITHOUT
340 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
341 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
342 for more details.
343
344 You should have received a copy of the GNU General Public License
345 along with this program.  If not, see <http://www.gnu.org/licenses/>.