From: <wt...@fr...> - 2005-04-26 18:08:07
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Wed Apr 27 2005 04:08:04 EST Log message: * gst/gsttrashstack.h: Ooohh. a nasty one! After having a failed pop() from the stack, it's possible that the stack is empty. In that case, don't follow the NULL pointer. Modified files: . : ChangeLog gst : gsttrashstack.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1029&r2=1.1030 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsttrashstack.h.diff?r1=1.12&r2=1.13 ====Begin Diffs==== Index: gsttrashstack.h =================================================================== RCS file: /cvs/gstreamer/gstreamer/gst/gsttrashstack.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gsttrashstack.h 31 Mar 2005 15:00:10 -0000 1.12 +++ gsttrashstack.h 26 Apr 2005 18:07:45 -0000 1.13 @@ -110,7 +110,9 @@ " incl %%ecx; \n\t" /* and increment */ SMP_LOCK "cmpxchg8b %1; \n\t" /* if eax:edx == *stack, move ebx:ecx to *stack, * else *stack is moved into eax:edx again... */ - " jnz 10b; \n\t" /* ... and we retry */ + " jz 20f; \n\t" /* success */ + " testl %%eax, %%eax; \n\t" /* if (head == NULL) return */ + " jnz 10b; \n\t" /* else we retry */ "20: \n\t" " popl %%ebx \n" : "=a" (head) Index: ChangeLog RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1029 retrieving revision 1.1030 diff -u -d -r1.1029 -r1.1030 --- ChangeLog 25 Apr 2005 13:00:46 -0000 1.1029 +++ ChangeLog 26 Apr 2005 18:07:45 -0000 1.1030 @@ -1,3 +1,10 @@ +2005-04-26 Wim Taymans <wi...@fl...> + + * gst/gsttrashstack.h: + Ooohh. a nasty one! After having a failed pop() from the stack, + it's possible that the stack is empty. In that case, don't + follow the NULL pointer. 2005-04-25 Wim Taymans <wi...@fl...> * gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active), |