[llvm-bugs] [Bug 40613] New: Code coverage crashing on windows

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 5 10:51:36 PST 2019


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

            Bug ID: 40613
           Summary: Code coverage crashing on windows
           Product: compiler-rt
           Version: 7.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: profile
          Assignee: unassignedbugs at nondot.org
          Reporter: mariusguggenmos at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21437
  --> https://bugs.llvm.org/attachment.cgi?id=21437&action=edit
sample code + binary + crash dump + description

TLDR: Small sample compiled on windows (clang-cl) with source code coverage
crashes in initializeValueProfRuntimeRecord

Host:
64 bit windows 10, 1803
VM in VirtualBox
AMD Ryzen 1700X
10GB RAM

>git status
On branch release/7.x
Your branch is up to date with 'origin/release/7.x'

Compiled with MSVC 19.16.27026.1

> clang-cl --version
clang version 7.1.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM701\bin

Build simple test program (source and binary attached) with source code
coverage, i.e.
"-fprofile-instr-generate -fcoverage-mapping"
Run it. It crashes in compiler-rt/lib/InstrProfilingValue.c (334)

Crash (also see test.dmp):
332   while (Site) {
333     C++;
334 --> Site = Site->Next;
335   }

Site: 0x959a638761943be0 (invalid memory address)

[0x0]   test!initializeValueProfRuntimeRecord + 0x14d   
[0x1]   test!writeOneValueProfData + 0x15d   
[0x2]   test!writeValueProfData + 0x8b   
[0x3]   test!lprofWriteDataImpl + 0x270   
[0x4]   test!lprofWriteData + 0xbc   
[0x5]   test!writeFile + 0xbd   
[0x6]   test!__llvm_profile_write_file + 0x179   
[0x7]   test!writeFileWithoutReturn + 0x1a   

Note that this is not c++ specific. I originally tested the sample as c code
with the same results.

-- 
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/20190205/a95d1dba/attachment-0001.html>


More information about the llvm-bugs mailing list