Skip to contentSkip to conversation

v1.0-1172-g235fe3b crashes (opts=0x0)

Qemu-devel Roy Tam 2 participants 5 messages Feb 24, 2012 – Aug 12, 2016

lore
Share & tools
lore

Roy Tam

author
#0 lore raw

Public bug reported:

C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios GNU gdb (GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe... done.
(gdb) r
Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios [New Thread 4724.0x1224]

Program received signal SIGSEGV, Segmentation fault. 0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")

    at qemu-option.c:545
545         QemuOpt *opt = qemu_opt_find(opts, name);
(gdb) bt
#0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
    at qemu-option.c:545
#1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
    at C:/msys/home/User/qemu/vl.c:3250
#2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
    at C:/msys/home/User/qemu/vl.c:102
#3  0x0061dcf4 in console_main ()
#4  0x0061ddb4 in WinMain@16 ()
#5  0x006329fb in main ()

(gdb)

** Affects: qemu
Importance: Undecided
Status: New

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

Title:
  v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
  New

Bug description:
  C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios
  GNU gdb (GDB) 7.3
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe...
  done.
  (gdb) r
  Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios
  [New Thread 4724.0x1224]

  Program received signal SIGSEGV, Segmentation fault.
  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  545         QemuOpt *opt = qemu_opt_find(opts, name);
  (gdb) bt
  #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
      at C:/msys/home/User/qemu/vl.c:3250
  #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
      at C:/msys/home/User/qemu/vl.c:102
  #3  0x0061dcf4 in console_main ()
  #4  0x0061ddb4 in WinMain@16 ()
  #5  0x006329fb in main ()
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/939995/+subscriptions
author
#1 lore raw

qemu_opt_find() doesn't check if opts is NULL or not before use. The patch fixes that issue.

** Patch added: "optfind_fixsegfault.patch"
https://bugs.launchpad.net/qemu/+bug/939995/+attachment/2777432/+files/optfind_fixsegfault.patch

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

Title:
  v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
  New

Bug description:
  C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios
  GNU gdb (GDB) 7.3
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe...
  done.
  (gdb) r
  Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios
  [New Thread 4724.0x1224]

  Program received signal SIGSEGV, Segmentation fault.
  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  545         QemuOpt *opt = qemu_opt_find(opts, name);
  (gdb) bt
  #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
      at C:/msys/home/User/qemu/vl.c:3250
  #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
      at C:/msys/home/User/qemu/vl.c:102
  #3  0x0061dcf4 in console_main ()
  #4  0x0061ddb4 in WinMain@16 ()
  #5  0x006329fb in main ()
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/939995/+subscriptions
#2 lore raw
In reply to Roy Tam

This is fixed by http://patchwork.ozlabs.org/patch/142548/ (which hasn't been applied yet but hopefully will be soon).

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

Title:
  v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
  New

Bug description:
  C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios
  GNU gdb (GDB) 7.3
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe...
  done.
  (gdb) r
  Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios
  [New Thread 4724.0x1224]

  Program received signal SIGSEGV, Segmentation fault.
  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  545         QemuOpt *opt = qemu_opt_find(opts, name);
  (gdb) bt
  #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
      at C:/msys/home/User/qemu/vl.c:3250
  #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
      at C:/msys/home/User/qemu/vl.c:102
  #3  0x0061dcf4 in console_main ()
  #4  0x0061ddb4 in WinMain@16 ()
  #5  0x006329fb in main ()
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/939995/+subscriptions
author
#3 lore raw

2012/2/24 Peter Maydell <[email protected]>:

Quoted 3 lines

This is fixed by http://patchwork.ozlabs.org/patch/142548/ (which hasn't been applied yet but hopefully will be soon).

It looks like a workaround to me as if you feed NULL to qemu_opt_find() it will still crashing.

Quoted 46 lines

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/939995

Title:
 v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
 New

Bug description:
 C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios GNU gdb (GDB) 7.3
 Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details.
 This GDB was configured as "mingw32".
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>...
 Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe... done.
 (gdb) r
 Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios [New Thread 4724.0x1224]

 Program received signal SIGSEGV, Segmentation fault. 0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel") at qemu-option.c:545
 545         QemuOpt *opt = qemu_opt_find(opts, name); (gdb) bt
 #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel") at qemu-option.c:545
 #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0) at C:/msys/home/User/qemu/vl.c:3250
 #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
     at C:/msys/home/User/qemu/vl.c:102
 #3  0x0061dcf4 in console_main ()
 #4  0x0061ddb4 in WinMain@16 ()
 #5  0x006329fb in main ()
 (gdb)

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

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

Title:
  v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
  New

Bug description:
  C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios
  GNU gdb (GDB) 7.3
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe...
  done.
  (gdb) r
  Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios
  [New Thread 4724.0x1224]

  Program received signal SIGSEGV, Segmentation fault.
  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  545         QemuOpt *opt = qemu_opt_find(opts, name);
  (gdb) bt
  #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
      at C:/msys/home/User/qemu/vl.c:3250
  #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
      at C:/msys/home/User/qemu/vl.c:102
  #3  0x0061dcf4 in console_main ()
  #4  0x0061ddb4 in WinMain@16 ()
  #5  0x006329fb in main ()
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/939995/+subscriptions
author
#4 lore raw
In reply to Roy Tam

Peter's fix had been included here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=967c0da73a7b0da186baba6
... so I think we can close this bug ticket now.

** Changed in: qemu
Status: New => Fix Released

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

Title:
  v1.0-1172-g235fe3b crashes (opts=0x0)

Status in QEMU:
  Fix Released

Bug description:
  C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu-system-i386.exe -L ..\pc-bios
  GNU gdb (GDB) 7.3
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe...
  done.
  (gdb) r
  Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu-system-i386.exe -L ..\\pc-bios
  [New Thread 4724.0x1224]

  Program received signal SIGSEGV, Segmentation fault.
  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  545         QemuOpt *opt = qemu_opt_find(opts, name);
  (gdb) bt
  #0  0x004eeda6 in qemu_opt_get (opts=0x0, name=0x68a7c3 "kernel")
      at qemu-option.c:545
  #1  0x004c7166 in qemu_main (argc=3, argv=0x3e5200, envp=0x0)
      at C:/msys/home/User/qemu/vl.c:3250
  #2  0x004c906a in SDL_main (argc=3, argv=0x3e5200)
      at C:/msys/home/User/qemu/vl.c:102
  #3  0x0061dcf4 in console_main ()
  #4  0x0061ddb4 in WinMain@16 ()
  #5  0x006329fb in main ()
  (gdb)

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