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

Bug#512264: marked as done (Illegal SDL struct access causes segfault)



Your message dated Wed, 19 Aug 2009 13:32:06 +0000
with message-id <E1MdlGo-0004HF-F9@ries.debian.org>
and subject line Bug#512264: fixed in dgen 1.23-11
has caused the Debian Bug report #512264,
regarding Illegal SDL struct access causes segfault
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
512264: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512264
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: dgen
Version: 1.23-10
Severity: normal
Tags: patch

*** Please type your report below this line ***
DGen, in its current form, attempts to access the "screen" SDL_Surface
struct when it pauses. In normal mode, this is desirable. However, these
accesses were not always prevented from happening in OpenGL mode, segfaulting
the program. I've included a patch that adds these checks below.

sdl.cpp.diff:
--- sdl-orig/sdl.cpp	2009-01-17 20:06:00.000000000 -0600
+++ sdl/sdl.cpp	2009-01-17 22:12:50.000000000 -0600
@@ -457,6 +457,9 @@
   
   // If you need to do any sort of locking before writing to the buffer, do so
   // here.
+#ifdef SDL_OPENGL_SUPPORT
+	if(!opengl) /*Don't do this in OpenGL mode; it crashes the emu*/
+#endif
   if(SDL_MUSTLOCK(screen))
     SDL_LockSurface(screen);
   
@@ -597,6 +600,9 @@
       q += mdscr.pitch;
     }
   // Unlock when you're done!
+#ifdef SDL_OPENGL_SUPPORT
+	if(!opengl)
+#endif
   if(SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
   // Update the screen
 #ifdef SDL_OPENGL_SUPPORT
@@ -917,6 +923,9 @@
 #ifdef HAVE_SDL_WM_TOGGLEFULLSCREEN
 	    int fullscreen = 0;
 	    // Switch out of fullscreen mode (assuming this is supported)
+#ifdef SDL_OPENGL_SUPPORT
+		if(!opengl)
+#endif
 	    if(screen->flags & SDL_FULLSCREEN) {
 	      fullscreen = 1;
 	      SDL_WM_ToggleFullScreen(screen);
@@ -1085,7 +1094,6 @@
 inline void pd_clear_message()
 {
   int i, j;
-  long *p = (long*)((char*)screen->pixels + (screen->pitch * ys));
 #ifdef SDL_OPENGL_SUPPORT
   if(opengl)
     {
@@ -1096,6 +1104,9 @@
   else
     {
 #endif
+	/*This line causes problems in OpenGL mode, so we put it here*/
+	/*This actually makes more sense, since it's not used up there*/
+	long *p = (long*)((char*)screen->pixels + (screen->pitch * ys));
       for(i = 0; i < 16; ++i, p += (screen->pitch >> 2))
         for(j = 0; j < 80 * screen->format->BytesPerPixel; ++j)
           p[j] = 0;


-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-3 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dgen depends on:
ii  libc6                        2.7-18      GNU C Library: Shared libraries
ii  libgcc1                      1:4.3.2-1.1 GCC support library
ii  libgl1-mesa-glx [libgl1]     7.0.3-7     A free implementation of the OpenG
ii  libsdl1.2debian              1.2.13-2    Simple DirectMedia Layer
ii  libstdc++6                   4.3.2-1.1   The GNU Standard C++ Library v3

dgen recommends no packages.

dgen suggests no packages.

-- no debconf information



      



--- End Message ---
--- Begin Message ---
Source: dgen
Source-Version: 1.23-11

We believe that the bug you reported is fixed in the latest version of
dgen, which is due to be installed in the Debian FTP archive:

dgen_1.23-11.diff.gz
  to pool/non-free/d/dgen/dgen_1.23-11.diff.gz
dgen_1.23-11.dsc
  to pool/non-free/d/dgen/dgen_1.23-11.dsc
dgen_1.23-11_amd64.deb
  to pool/non-free/d/dgen/dgen_1.23-11_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 512264@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Tony Palma <xbytemx@gmail.com> (supplier of updated dgen package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 17 Aug 2009 05:53:14 -0500
Source: dgen
Binary: dgen
Architecture: source amd64
Version: 1.23-11
Distribution: unstable
Urgency: low
Maintainer: Tony Palma <xbytemx@gmail.com>
Changed-By: Tony Palma <xbytemx@gmail.com>
Description: 
 dgen       - Sega Genesis/MegaDrive emulator
Closes: 487479 512264
Changes: 
 dgen (1.23-11) unstable; urgency=low
 .
   * New maintainer. Closes: #487479.
   * debian/control. Bump standards-version.
   * Add a debian/watch file.
   * Change xlibmesa-gl-dev to libgl1-mesa-dev in build-depends
   * Patch to prevent a segfault in opengl mode.
     Thanks Trevour Crow. Closes: #512264.
   * Fix for some warnings in man page dgenrc.5.
   * Add Clean rule to debian/rules
   * Remove an unnecessary Makefiles.
Checksums-Sha1: 
 711ab22221602e6ed67ee158431561fab65b464f 1030 dgen_1.23-11.dsc
 0d079c2215d69dfb938507f178731cceedd4c491 31762 dgen_1.23-11.diff.gz
 1deaf1cba215104d12fca7eef0ec44551093345d 253866 dgen_1.23-11_amd64.deb
Checksums-Sha256: 
 f951cc04eaa5cd79d0ae3baf6bff9cb86ed269f3f45d2dbf26cc594aecc9b500 1030 dgen_1.23-11.dsc
 23d531e8d561284bb8aa9263d1604c0df1b3d400890f6e69706aff32fe8f554b 31762 dgen_1.23-11.diff.gz
 5fa8c089c3733e1795d3674ecfa74b79ed8d255e6ea68c4f7c1c1a4aa61a8a94 253866 dgen_1.23-11_amd64.deb
Files: 
 32ad168efb28d9c6e36b93da63770d7c 1030 non-free/otherosfs optional dgen_1.23-11.dsc
 fc3c4584c007c8085e4abf24146890bd 31762 non-free/otherosfs optional dgen_1.23-11.diff.gz
 ba9412ba01e95742e2b234f3c1efc21c 253866 non-free/otherosfs optional dgen_1.23-11_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqL/GIACgkQbMaawmho9B//6QCfR4iYU74o3opaqmB2QjjX3FZX
qlUAn2aFvv9tUbmRwXYLsE7QRwJIAOPE
=OQFC
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: