<html>
<head>
<base href="http://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 --- - VLAIS - false positive"
href="http://llvm.org/bugs/show_bug.cgi?id=19463">19463</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>VLAIS - false positive
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dl9pf@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Compiling the kernel fails with
CC arch/x86/xen/mmu.o
/home/dl9pf/llvmlinux/targets/x86_64/src/linux/arch/x86/xen/mmu.c:1347:18:
error: fields must have a constant size: 'variable length array in structure'
extension will never be supported
DECLARE_BITMAP(mask, num_processors);
^
/home/dl9pf/llvmlinux/targets/x86_64/src/linux/include/linux/types.h:10:16:
note: expanded from macro 'DECLARE_BITMAP'
unsigned long name[BITS_TO_LONGS(bits)]
^
1 error generated.
include/linux/types.h:
######################
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
include/linux/bitops.h:
#######################
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
include/linux/kernel.h:
#######################
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
So DECLARE_BITMAP(mask, num_processors) should actually expand to a fixed -
but indeed platform-specific - size.
from mmu.i:
###########
static void xen_flush_tlb_others(const struct cpumask *cpus,
struct mm_struct *mm, unsigned long start,
unsigned long end)
{
struct {
struct mmuext_op op;
unsigned long mask[(((num_processors) + (8 * sizeof(long)) - 1) / (8 *
sizeof(long)))];
} *args;
struct multicall_space mcs;
I totally agree this looks and smells like VLAIS, but is it?
Can we deal with this in llvm/clang ?</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>