[llvm-bugs] [Bug 25383] New: clang dies on abort trap when parsing format string "%*D" for custom printf-like function
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Mon Nov  2 12:07:21 PST 2015
    
    
  
https://llvm.org/bugs/show_bug.cgi?id=25383
            Bug ID: 25383
           Summary: clang dies on abort trap when parsing format string
                    "%*D" for custom printf-like function
           Product: clang
           Version: unspecified
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: matthew.bryan at isilon.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified
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 http://llvm.org/bugs/
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 matthew.bryan at isilon.com for more info if you need.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151102/4a0553f9/attachment.html>
    
    
More information about the llvm-bugs
mailing list