<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang dies on abort trap when parsing format string "%*D" for custom printf-like function"
href="https://llvm.org/bugs/show_bug.cgi?id=25383">25383</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang dies on abort trap when parsing format string "%*D" for custom printf-like function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>matthew.bryan@isilon.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see
invocation)
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd11.0
Thread model: posix
cc: note: diagnostic msg: PLEASE submit a bug report to <a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a>
and include the crash backtrace, preprocessed source, and associated run
script.
cc: note: diagnostic msg:
I'm afraid I can't share more than this one line of code, due to this being
proprietary stuff. Here is our function:
fmt_print(&fmt, "%*D", flush_size,
isi_ostream_get_ptr(os));
This seems to compile just fine with "%*s" for example, but it dies with
"%*D" and "%D". Our custom formated printer fmt_print is written specifically
to allow this formatter. Perhaps that defies some convention I'm not sure, but
clang should not faceplant if it is.
isi_ostream_get_ptr is a 1-line inline function that just does some pointer
arithmetic. Replacing the function call with the function body does not fix the
problem.
/var/crash/tools/toolchain/usr/bin/cc -cc1 -triple x86_64-unknown-freebsd11.0
-e
mit-obj -disable-free -main-file-name lkf_delegate.c -mrelocation-model static
-
mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases
-mcode-mo
del kernel -disable-red-zone -no-implicit-float -target-cpu x86-64
-target-featu
re -aes -target-feature -avx -target-feature -mmx -target-feature -sse -g
-nostd
systeminc -nobuiltininc -D "__ISILON__" -D "NO_BSD_MINMAX" -D "_KERNEL" -D
"KLD_
MODULE" -D "HAVE_KERNEL_OPTION_HEADERS" -O2 -Wno-gnu
-Wno-error-tautological-com
pare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-format-security
-Wno-missing-field-initializers -Werror -Wall -Wredundant-decls
-Wnested-externs
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
-
Wundef -Wno-pointer-sign -Wmissing-include-dirs -Wno-error-tautological-compare
-Wno-error-empty-body -Wno-error-parentheses-equality -Wno-format-security
-std=
iso9899:1999 -ferror-limit 19 -fmessage-length 0 -ffreestanding
-fformat-extensi
ons -fwrapv -stack-protector 1 -mstackrealign -fisilon-format-extensions
-fobjc-
runtime=gnustep -fobjc-default-synthesize-properties -fno-common
-fdiagnostics-s
how-option -backend-option -vectorize-loops -msoft-float -x c
lkf_delegate-hJ6Po
p.c
I'm sorry there isn't much more information I can provide. Please shoot me an
email at <a href="mailto:matthew.bryan@isilon.com">matthew.bryan@isilon.com</a> for more info if you need.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>