History log of /external/ltrace/printf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c00837c2928da53a3515b107399b742ea157e78a 11-Nov-2013 Petr Machata <pmachata@redhat.com> Support wide character strings

- "string" lens and "format" pack were extended such that using an
integer as underlying array type denotes a wide character string.

- several prototypes from wchar.h were added to libc.so.conf.

- ltrace.conf.5 was updated
/external/ltrace/printf.c
cae76962c7e0ec6119952addb36d1cf8d19f5228 26-Sep-2013 Peter Wu <lekensteyn@gmail.com> Prevent freeing static-alloc'd memory for %p and %n in printf

The following code caused ltrace 0.7.3-1 to crash on Arch Linux because
an invalid pointer was passed to free():

printf("%p", &whatever);

In printf.c, the elt_info pointer was always a statically allocated
memory address from type_get_simple():

115 if (format_type == ARGTYPE_ARRAY ||
format_type == ARGTYPE_POINTER)
116 elt_info = type_get_simple(elt_type);

Therefore, do not assert that the caller form_next_param owns the
elt_info pointer.

Originally reported at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724253

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
/external/ltrace/printf.c
0441bafdfecfb9d475912d6ca6e4abe6a66664d6 09-Jan-2013 Petr Machata <pmachata@redhat.com> Coding style: annotate a fall-through in printf.c
/external/ltrace/printf.c
84c86d73716b1e785f2690918403d7094393e1f3 30-Oct-2012 Petr Machata <pmachata@redhat.com> For string types in printf.c, return a pointer to array, not array

Though ltrace currently translates the latter to the former, this is the
actual proper parameter type.

Also fix one prototype in test suite for the same reason.
/external/ltrace/printf.c
58e75f5bf209db5edee2a142add49ee447bc4313 30-Oct-2012 Petr Machata <pmachata@redhat.com> Fix ownership tracking of zero() node in config file parser and printf.c
/external/ltrace/printf.c
168044811945744658d45bb05075c13b60cd7fa0 30-Oct-2012 Petr Machata <pmachata@redhat.com> Fix initialization of primitive types in printf.c
/external/ltrace/printf.c
43417844f6a8d26ae7388101f4eaf49d03be5cfc 29-Oct-2012 Petr Machata <pmachata@redhat.com> In param_printf_done, release format string argument

This plugs a leak.
/external/ltrace/printf.c
e36298a706b96bfdf9335fbe8288827761d77957 13-Sep-2012 Petr Machata <pmachata@redhat.com> Introduce parameter pack flavors and parameter pack backend callbacks

The issue this is trying to solve is that some backends (Itanium in
particular) change the parameter passing convention depending on whether
given parameter is part of varargs parameter or not. Therefore the
backend needs to know a) that any give argument is part of parameter pack,
and b) if it is, whether it's a varargs-type pack, or something else.

Backends that wish to use this should add #define ARCH_HAVE_FETCH_PACK and
define functions arch_fetch_param_pack_{start,end} (with the same interface
as fetch_param_pack_{start,end} from fetch.h).
/external/ltrace/printf.c
c70b19501f800cb911ac906c7fb153c4a37f5f57 27-Apr-2012 Petr Machata <pmachata@redhat.com> Format 'o' and 'x' printf modifiers properly
/external/ltrace/printf.c
e3f4a984db115979e09414b7281da98399dd8949 09-Jan-2012 Petr Machata <pmachata@redhat.com> Drop ARGTYPE_STRING, reimplement as lens over array of chars
/external/ltrace/printf.c
b781916d24d6ee96842c818b5e18af31808d427d 09-Jan-2012 Petr Machata <pmachata@redhat.com> Drop ARGTYPE_UNKNOWN, use guess_lens instead
/external/ltrace/printf.c
31af32cfcd61671cbb5e567870103766b3231521 08-Jan-2012 Petr Machata <pmachata@redhat.com> Add lenses

- this adds the lens framework, although there are currently no interesting
lenses. display_args.c was mostly moved to lens_default.c
/external/ltrace/printf.c
940ec0650bfe0f1deda96d3561be3d0006df92fc 06-Jan-2012 Petr Machata <pmachata@redhat.com> Introduce printf module, drop ARGTYPE_FORMAT
/external/ltrace/printf.c