qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] patch to fix EXC_BAD_ACCESS on Mac OS X
@ 2013-02-01 12:14 Christopher Friedt
  2013-02-01 12:20 ` Christopher Friedt
  2013-02-01 18:01 ` Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Christopher Friedt @ 2013-02-01 12:14 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

Hi folks,

I've been digging through a bunch of runtime errors in OS X. One of
them was an EXC_BAD_ACCESS (segfault) caused by some code in
main-loop.c that accessed uninitialized stack variables. Please see
the attached patch. The problem still exists in the master branch of
the git repository.

I've also been running into a failed assertion which causes SIGABRT

Assertion failed: (QLIST_EMPTY(&bs->tracked_requests)), function
bdrv_drain_all, file block.c, line 1220.

I haven't yet found out the root cause of it, but it sounds like
another struct that isn't properly zero'd. Will keep working on it.

C

[-- Attachment #2: qemu-1.3.0_to_gitmaster-fix-exc-bad-access-in-main-loop.patch --]
[-- Type: application/octet-stream, Size: 521 bytes --]

commit 253bf8ee69bad2e9f66b580b19250eb2dfe403d6
Author: Christopher Friedt <chrisfriedt@gmail.com>
Date:   Sat Jan 26 22:21:22 2013 -0500

    fix EXC_BAD_ACCESS error on Mac OS X

diff --git a/main-loop.c b/main-loop.c
index c87624e..1280869 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -40,7 +40,7 @@ static void sigfd_handler(void *opaque)
 {
     int fd = (intptr_t)opaque;
     struct qemu_signalfd_siginfo info;
-    struct sigaction action;
+    struct sigaction action = {};
     ssize_t len;
 
     while (1) {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-02 11:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01 12:14 [Qemu-devel] patch to fix EXC_BAD_ACCESS on Mac OS X Christopher Friedt
2013-02-01 12:20 ` Christopher Friedt
2013-02-01 18:01 ` Peter Maydell
2013-02-02  2:38   ` Christopher Friedt
2013-02-02 11:07     ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).