OSDN Git Service

Fix log_backtrace assertion failure caused by LP64 fix.
authorElliott Hughes <enh@google.com>
Tue, 25 Feb 2014 23:32:01 +0000 (15:32 -0800)
committerElliott Hughes <enh@google.com>
Tue, 25 Feb 2014 23:32:01 +0000 (15:32 -0800)
commitba76572789740ec1a04da30dd89121ef5cb0bf44
treed0fc08febdef41d97549daa11256f3d5f657c7d5
parent901553aaf4960c4ab21c9a090919aee8be5e62ab
Fix log_backtrace assertion failure caused by LP64 fix.

When libc.debug.malloc is enabled, stack backtraces fail with:

bionic/libc/bionic/libc_logging.cpp:378: assertion "conversion
    specifier unsupported" failed

The cause was a change to the format specifier from "%08x" to
"%0*x" to pass the field width as an additional parameter.
Unfortunately this modifier isn't supported by out_vformat() in
libc_logging.cpp.

Changed to use "%016x" if __LP64__ is defined; "%08x" otherwise.

Bug: 13177507
Change-Id: Ibf07263acf14da086d3c3788872f4b5477bd5708
libc/bionic/debug_stacktrace.cpp