qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 796480] [NEW] Addresses with 4GB differences are consi


From: Khansa Butt
Subject: [Qemu-devel] [Bug 796480] [NEW] Addresses with 4GB differences are consider as one single address in QEMU
Date: Mon, 13 Jun 2011 08:41:12 -0000

Public bug reported:

THIS IS THE ISSUE OF USER MODE EMULATION
Information about guest and host
**********************************
guest: 64 bit x86 user mode binary
host: 32 bit Linux OS
uname -a :Linux KICS-HPCNL-32blue 2.6.33.3-85.fc13.i686.PAE #1 SMP
architecture: intel64
Bug Description
****************
for memory reference instructions, suppose I have two addresses in guest 
address space(64 bit)
0x220000000
0x320000000
as lower 32 bit part of both addresses are same, when particular instructions 
are translated into host code(32 bit)
in both above cases the value is loaded from same memory and we get same value. 
where actual behaviour was to get two different values.
here is the program which i used to test:
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define SIZE 4294967298 /* 4Gib*/

int main() {
   char *array;
   unsigned int i;

   array = malloc(sizeof(char) * SIZE);
   if(array == NULL)    {
      fprintf(stderr, "Could not allocate that much memory");
      return 1;    }
    array[0] = 'a';
   array[SIZE-2] = 'z';
   printf("array[SIZE-2] = %c array[0] = %c\n",array[SIZE-2], array[0]);
  return 0;
}
I have 8 gib RAM
I compiled this program on 64 bit linux  and run this on 32 bit linux with qemu
QEMU command line and output
**********************************
$x86_64-linux-user/qemu-x86_64 ~/ar_x86 
output: array[SIZE-1] = z,array[0] = z 
Release information
********************
x86_64 binary is tested with latest release : qemu-0.14.1
and with current development tree as well( live code of QEMU using git)

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/796480

Title:
  Addresses with 4GB differences are consider as one single address in
  QEMU

Status in QEMU:
  New

Bug description:
  THIS IS THE ISSUE OF USER MODE EMULATION
  Information about guest and host
  **********************************
  guest: 64 bit x86 user mode binary
  host: 32 bit Linux OS
  uname -a :Linux KICS-HPCNL-32blue 2.6.33.3-85.fc13.i686.PAE #1 SMP
  architecture: intel64
  Bug Description
  ****************
  for memory reference instructions, suppose I have two addresses in guest 
address space(64 bit)
  0x220000000
  0x320000000
  as lower 32 bit part of both addresses are same, when particular instructions 
are translated into host code(32 bit)
  in both above cases the value is loaded from same memory and we get same 
value. where actual behaviour was to get two different values.
  here is the program which i used to test:
  #include <stdio.h>
  #include <stdlib.h>
  #include <limits.h>
  #define SIZE 4294967298 /* 4Gib*/

  int main() {
     char *array;
     unsigned int i;

     array = malloc(sizeof(char) * SIZE);
     if(array == NULL)    {
        fprintf(stderr, "Could not allocate that much memory");
        return 1;    }
      array[0] = 'a';
     array[SIZE-2] = 'z';
     printf("array[SIZE-2] = %c array[0] = %c\n",array[SIZE-2], array[0]);
    return 0;
  }
  I have 8 gib RAM
  I compiled this program on 64 bit linux  and run this on 32 bit linux with 
qemu
  QEMU command line and output
  **********************************
  $x86_64-linux-user/qemu-x86_64 ~/ar_x86 
  output: array[SIZE-1] = z,array[0] = z 
  Release information
  ********************
  x86_64 binary is tested with latest release : qemu-0.14.1
  and with current development tree as well( live code of QEMU using git)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/796480/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]