[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] qemu ppc64 TCG ignores high bits of addresses
From: |
Anton Blanchard |
Subject: |
[Qemu-ppc] qemu ppc64 TCG ignores high bits of addresses |
Date: |
Tue, 7 May 2019 10:09:54 +1000 |
Hi,
The test case below doesn't hit a SEGV and it should. It looks like we
just ignore some of the upper bits (8?).
Thanks,
Anton
--
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#define ADDR1 0x10000000UL
#define ADDR2 (0x10000000000000UL+ADDR1)
int main(void)
{
if (mmap((unsigned long *)ADDR1, getpagesize(), PROT_READ|PROT_WRITE,
MAP_FIXED|MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) == MAP_FAILED) {
perror("mmap");
exit(1);
}
*(unsigned long *)ADDR1 = 1;
*(unsigned long *)ADDR2 = 1;
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-ppc] qemu ppc64 TCG ignores high bits of addresses,
Anton Blanchard <=