[MPlayer-cygwin] mingw32 crash in aclib fast_memcpy when using vf=ssp

Gianluigi Tiesi mplayer at netfarm.it
Mon Aug 28 10:13:06 CEST 2006


I can't figure out how to fix this, the problem doesn't spots
on linux, I've also asm compared linux and windows object files,
the code where it crashes is the same.

I've isolated the problem, the crash is here:

(asm is in intel format)

00437333  |.  8B5C06 20     |MOV EBX,DWORD PTR DS:[ESI+EAX+20]

DS:[02F6F008]=??? <-- access violation when reading
EBX=FEEEFEEE

context

00437320  |.  31C0          XOR EAX,EAX
00437322  |.  8DB426 000000>LEA ESI,DWORD PTR DS:[ESI]
00437329  |.  8DBC27 000000>LEA EDI,DWORD PTR DS:[EDI]
00437330  |>  8B1C06        /MOV EBX,DWORD PTR DS:[ESI+EAX]
00437333  |.  8B5C06 20     |MOV EBX,DWORD PTR DS:[ESI+EAX+20]
00437337  |.  8B5C06 40     |MOV EBX,DWORD PTR DS:[ESI+EAX+40]
0043733B  |.  8B5C06 60     |MOV EBX,DWORD PTR DS:[ESI+EAX+60]
0043733F  |.  05 80000000   |ADD EAX,80
00437344  |.  39D0          |CMP EAX,EDX
00437346  |.^ 72 E8         |JB SHORT mplayer.00437330
00437348  |.  31C0          |XOR EAX,EAX
0043734A  |.  8DB6 00000000 |LEA ESI,DWORD PTR DS:[ESI] <--- who adds this instruction?
00437350  |>  0F6F0406      |/MOVQ MM0,QWORD PTR DS:[ESI+EAX]
00437354  |.  0F6F4C06 08   ||MOVQ MM1,QWORD PTR DS:[ESI+EAX+8]
00437359  |.  0F6F5406 10   ||MOVQ MM2,QWORD PTR DS:[ESI+EAX+10]
0043735E  |.  0F6F5C06 18   ||MOVQ MM3,QWORD PTR DS:[ESI+EAX+18]
00437363  |.  0F6F6406 20   ||MOVQ MM4,QWORD PTR DS:[ESI+EAX+20]
00437368  |.  0F6F6C06 28   ||MOVQ MM5,QWORD PTR DS:[ESI+EAX+28]
0043736D  |.  0F6F7406 30   ||MOVQ MM6,QWORD PTR DS:[ESI+EAX+30]
00437372  |.  0F6F7C06 38   ||MOVQ MM7,QWORD PTR DS:[ESI+EAX+38]
00437377  |.  0FE70407      ||MOVNTQ QWORD PTR DS:[EDI+EAX],MM0
0043737B  |.  0FE74C07 08   ||MOVNTQ QWORD PTR DS:[EDI+EAX+8],MM1
00437380  |.  0FE75407 10   ||MOVNTQ QWORD PTR DS:[EDI+EAX+10],MM2
00437385  |.  0FE75C07 18   ||MOVNTQ QWORD PTR DS:[EDI+EAX+18],MM3
0043738A  |.  0FE76407 20   ||MOVNTQ QWORD PTR DS:[EDI+EAX+20],MM4
0043738F  |.  0FE76C07 28   ||MOVNTQ QWORD PTR DS:[EDI+EAX+28],MM5
00437394  |.  0FE77407 30   ||MOVNTQ QWORD PTR DS:[EDI+EAX+30],MM6
00437399  |.  0FE77C07 38   ||MOVNTQ QWORD PTR DS:[EDI+EAX+38],MM7
0043739E  |.  83C0 40       ||ADD EAX,40
004373A1  |.  39D0          ||CMP EAX,EDX
004373A3  |.^ 72 AB         |\JB SHORT mplayer.00437350

in source code (aclib_template.c) I've made some references:
(sorry unwrapped formattation)

if(i>=BLOCK_SIZE/64)
	asm volatile(
		"xor %%"REG_a", %%"REG_a"	\n\t"
		".balign 16		\n\t"
		"1:			\n\t"
		"movl (%0, %%"REG_a"), %%ebx 	\n\t" --> 00437330 MOV EBX,DWORD PTR DS:[ESI+EAX]
		"movl 32(%0, %%"REG_a"), %%ebx 	\n\t" --> 00437333 MOV EBX,DWORD PTR DS:[ESI+EAX+20]
		"movl 64(%0, %%"REG_a"), %%ebx 	\n\t"
		"movl 96(%0, %%"REG_a"), %%ebx 	\n\t"
		"add $128, %%"REG_a"		\n\t"
		"cmp %3, %%"REG_a"		\n\t"
		" jb 1b				\n\t"

		"xor %%"REG_a", %%"REG_a"	\n\t"

		".balign 16		\n\t"
		"2:			\n\t"
		"movq (%0, %%"REG_a"), %%mm0\n" --> 00437350 MOVQ MM0,QWORD PTR DS:[ESI+EAX]
		"movq 8(%0, %%"REG_a"), %%mm1\n"
		"movq 16(%0, %%"REG_a"), %%mm2\n"
		"movq 24(%0, %%"REG_a"), %%mm3\n"
		"movq 32(%0, %%"REG_a"), %%mm4\n"
		"movq 40(%0, %%"REG_a"), %%mm5\n"
		"movq 48(%0, %%"REG_a"), %%mm6\n"
		"movq 56(%0, %%"REG_a"), %%mm7\n"


....
small_memcpy()

the code is called from filter and then put_image, the second call crashes
my compile has mmx no see (athlon tb), tested with gcc 4.1.1 and
gcc 4.2 from svn

Any clue?
Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/



More information about the MPlayer-cygwin mailing list