Bug 879495 - -m 222222 crashes
Summary: -m 222222 crashes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-23 07:09 UTC by langfang
Modified: 2012-11-26 02:54 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-23 07:22:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description langfang 2012-11-23 07:09:14 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# uname -r
2.6.32-342.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.334.el6.x86_64


How reproducible:

always
Steps to Reproduce:
root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 222222
Failed to allocate 233016655872 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 22222222
Failed to allocate 23301688655872 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 22222222222
Failed to allocate 23301688888655872 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 22222222222444432
qemu: invalid ram size: 22222222222444432
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 222222222224444321221
qemu: invalid ram size: 222222222224444321221
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m sfafa
qemu: invalid ram size: sfafa

Actual results:
 Aborted (core dumped)

Expected results:
 invalid ram size:XXXXXXX

Additional info:
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 33333333333
Failed to allocate 34952533334032384 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 4444444444
Failed to allocate 4660337777311744 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 5555555555
Failed to allocate 5825422222688256 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 555555555578
Failed to allocate 582542222245756928 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 55555555557899
qemu: invalid ram size: 55555555557899
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 55555555557899111
qemu: invalid ram size: 55555555557899111
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 999999999
Failed to allocate 1048576000000000 B: Cannot allocate memory
Aborted (core dumped)
[root@amd-2427-32-2 home]# /usr/libexec/qemu-kvm -nodefaults --enable-kvm -S -m 999999999211
Failed to allocate 1048575999173722112 B: Cannot allocate memory
Aborted (core dumped)

Comment 1 juzhang 2012-11-26 02:54:27 UTC
Forget to add comment, close as not bug base on the following reason.
1. The core is generated since the codes calls abort() not a segfault.
2.  The message is pretty clear
Failed to allocate 233016655872 B: Cannot allocate memory
Aborted (core dumped)


Note You need to log in before you can comment on or make changes to this bug.