[LLVMbugs] [Bug 20979] New: UBSan errors in llvm-cov (misaligned memory access)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 17 13:01:57 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20979
Bug ID: 20979
Summary: UBSan errors in llvm-cov (misaligned memory access)
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: vonosmas at gmail.com
CC: llvm-bugs at justinbogner.com, llvmbugs at cs.uiuc.edu
Blocks: 20815
Classification: Unclassified
The following llvm-cov tests fail under UBSan bootstrap of LLVM:
LLVM :: tools/llvm-cov/showExpansions.cpp
LLVM :: tools/llvm-cov/showHighlightedRanges.cpp
LLVM :: tools/llvm-cov/showLineExecutionCounts.cpp
LLVM :: tools/llvm-cov/showRegionMarkers.cpp
The problem is misaligned access in CoverageMappingReader.
Example error report:
llvm/lib/ProfileData/CoverageMappingReader.cpp:349:17: runtime error: member
access within misaligned address 0x00000271f4fa for type 'const (anonymous
namespace)::CoverageMappingTURecord<unsigned long>', which requires 4 byte
alignment
0x00000271f4fa: note: pointer points here
6d 61 69 6e 01 00 00 00 40 00 00 00 68 00 00 00 00 00 00 00 d0 20 00 00 01
00 00 00 04 00 00 00
^
#0 0x7f985a in std::error_code readCoverageMappingData<unsigned
long>((anonymous namespace)::SectionData&, llvm::StringRef,
std::vector<llvm::coverage::ObjectFileCoverageMappingReader::ProfileMappingRecord,
std::allocator<llvm::coverage::ObjectFileCoverageMappingReader::ProfileMappingRecord>
>&, std::vector<llvm::StringRef, std::allocator<llvm::StringRef> >&)
llvm/lib/ProfileData/CoverageMappingReader.cpp:349:5
#1 0x7f7e8c in
llvm::coverage::ObjectFileCoverageMappingReader::ObjectFileCoverageMappingReader(std::unique_ptr<llvm::MemoryBuffer,
std::default_delete<llvm::MemoryBuffer> >&, llvm::sys::fs::file_magic)
llvm/lib/ProfileData/CoverageMappingReader.cpp:455:11
#2 0x45c915 in (anonymous namespace)::CodeCoverageTool::load()
llvm/tools/llvm-cov/CodeCoverage.cpp:388:3
#3 0x456bf6 in (anonymous namespace)::CodeCoverageTool::show(int, char
const**, std::function<int (int, char const**)>)
llvm/tools/llvm-cov/CodeCoverage.cpp:611:7
#4 0x44dd20 in (anonymous namespace)::CodeCoverageTool::run((anonymous
namespace)::CodeCoverageTool::Command, int, char const**)
llvm/tools/llvm-cov/CodeCoverage.cpp:558:12
#5 0x44b1de in show_main(int, char const**)
llvm/tools/llvm-cov/CodeCoverage.cpp:702:10
#6 0x41f8ae in main llvm/tools/llvm-cov/llvm-cov.cpp:55:14
To reproduce: build LLVM with just-built Clang and
-DLLVM_USE_SANITIZER=Undefined CMake option. I'm going to disable all llvm-cov
tests under UBSan in test/toools/llvm-cov/lit.local.cfg, so that suppression
will have to be removed as well.
--
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/20140917/e9886291/attachment.html>
More information about the llvm-bugs
mailing list