[MPlayer-dev-eng] sig11 in -vo x11 - probably bug in SwScaler

Fredrik Kuivinen freku045 at student.liu.se
Sun Mar 31 16:49:13 CEST 2002


On Sun, Mar 31, 2002 at 12:37:28PM +0200, Arpi wrote:
> I'm also started using njamd-0.8.1, a very nice (and working) memory
> debugger. It somehow locks memory areas and tell me when teh code
> reads/writes more than the allocated size or if it tries to free/realloc
> unallocated memory. I suggest using it for testing, catched several strange
> random crashes yesterday.
> 

Another memory checking tool, which I find very useful, is valgrind 
(http://developer.kde.org/~sewardj/). It can detect a few kinds of 
errors that the malloc checkers can't detect, such as use of
uninitialized memory. Valgrind runs the program on a simulated cpu,
one consequence of this is that it can't handle mmx, sse, 3dnow etc
yet.

I have attached a patch which is needed to get it working with
mplayer.

> MPlayer used to be stable, but nowdays even I got random sig11s
> everywhere... it's not good... especially as we're getting closer to
> the big bumm - the first gpl release. it may be v1.0, maybe we should
> release some 0.9x first, but I think we've done the planned feature list for
> 1.0 so no more sense of delaying it... so don't make big-bug-pack.
> 

I think we definitely should do a few 0.9x releases before 1.0. But
that is just my humble opinion.

/ Fredrik

-------------- next part --------------
diff -u /tmp/valgrind-20020317/vg_malloc2.c ./vg_malloc2.c
--- /tmp/valgrind-20020317/vg_malloc2.c	Sat Mar 16 04:13:44 2002
+++ ./vg_malloc2.c	Tue Mar 19 16:11:48 2002
@@ -1082,7 +1082,7 @@
       a power of 2.  There must be a better way to do this.  What is
       it? */
    switch (req_alignB) {
-      case 8: case 16: case 32: case 64: case 128: case 256: 
+      case 4: case 8: case 16: case 32: case 64: case 128: case 256: 
       case 512: case 1024: case 2048: case 4096: case 8192: 
       case 16384: case 32768: case 65536: case 131072: 
       case 1048576: 
diff -u /tmp/valgrind-20020317/vg_syscall_mem.c ./vg_syscall_mem.c
--- /tmp/valgrind-20020317/vg_syscall_mem.c	Sat Mar 16 03:24:05 2002
+++ ./vg_syscall_mem.c	Tue Mar 19 16:14:24 2002
@@ -1471,7 +1471,38 @@
                                 arg3, sizeof(int));
                KERNEL_DO_SYSCALL(res);
                break;
-          
+
+            /* Real Time Clock (/dev/rtc) ioctls */
+            case RTC_UIE_ON:
+            case RTC_UIE_OFF:
+            case RTC_AIE_ON:
+            case RTC_AIE_OFF:
+            case RTC_PIE_ON:
+            case RTC_PIE_OFF:
+            case RTC_IRQP_SET:
+                KERNEL_DO_SYSCALL(res);
+                break;
+            case RTC_RD_TIME:
+            case RTC_ALM_READ:
+                must_be_writable("ioctl(RTC_RD_TIME/ALM_READ)", arg3,
+                                 sizeof(struct rtc_time));
+                KERNEL_DO_SYSCALL(res);
+                if(!VG_(is_kerror) && res == 0)
+                    make_readable(arg3, sizeof(struct rtc_time));
+                break;
+            case RTC_ALM_SET:
+                must_be_readable("ioctl(RTC_ALM_SET)", arg3,
+                                 sizeof(struct rtc_time));
+                KERNEL_DO_SYSCALL(res);
+                break;
+            case RTC_IRQP_READ:
+                must_be_writable("ioctl(RTC_IRQP_READ)", arg3,
+                                 sizeof(unsigned long));
+                KERNEL_DO_SYSCALL(res);
+                if(!VG_(is_kerror) && res == 0)
+                    make_readable(arg3, sizeof(unsigned long));
+                break;
+               
             /* We don't have any specific information on it, so
                try to do something reasonable based on direction and
                size bits.  The encoding scheme is described in
diff -u /tmp/valgrind-20020317/vg_unsafe.h ./vg_unsafe.h
--- /tmp/valgrind-20020317/vg_unsafe.h	Thu Mar 14 17:58:27 2002
+++ ./vg_unsafe.h	Tue Mar 19 16:15:02 2002
@@ -60,6 +60,7 @@
 
 #include <asm/ioctls.h>   /* for stuff for dealing with ioctl :( */
 #include <sys/soundcard.h> /* for various soundcard ioctl constants :( */
+#include <linux/rtc.h>     /* for RTC_* ioctls */
 
 #include <termios.h>
 #include <pty.h>


More information about the MPlayer-dev-eng mailing list