[llvm-bugs] [Bug 25122] New: Ubsan: std::map<T, std::function<F>> fails with -fsanitize=alignment

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 9 06:57:53 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=25122

            Bug ID: 25122
           Summary: Ubsan: std::map<T, std::function<F>> fails with
                    -fsanitize=alignment
           Product: clang
           Version: 3.7
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gburton.feral at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15042
  --> https://llvm.org/bugs/attachment.cgi?id=15042&action=edit
Sample project which demonstrates behaviour

Compiling a program which contains a declaration of std::map<T,
std::function<F>> (where T and F are types) with `-fsanitize=alignment
-fsanitize-undefined-trap-on-error` produces an executable which fails to run
(crashes with EXC_BAD_INSTRUCTION).

Tested with Apple Clang, and the official Clang3.7 binary release.

Runs without errors on GCC-5.2.0

-- 
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/20151009/7db52352/attachment.html>


More information about the llvm-bugs mailing list