* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
@ 2012-02-12 17:58 ` ktietz at gcc dot gnu.org
2012-02-13 15:18 ` ktietz at gcc dot gnu.org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-12 17:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-12
CC| |ktietz at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-12 17:58:27 UTC ---
Yes, I missed to adjust displacement. Following hunk
@@ -614,7 +614,7 @@
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
- unsigned int __dis = __fun - (__ctx + 22); \
+ unsigned int __dis = __fun - (__ctx + 49); \
unsigned short __size = (unsigned short)(SIZE); \
*(unsigned int *) &__tramp[0] = 0x8324048b; /* mov (%esp), %eax */ \
*(unsigned int *) &__tramp[4] = 0x4c890cec; /* sub $12, %esp */ \
fixes it.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
2012-02-12 17:58 ` [Bug libffi/52221] " ktietz at gcc dot gnu.org
@ 2012-02-13 15:18 ` ktietz at gcc dot gnu.org
2012-02-13 15:19 ` ktietz at gcc dot gnu.org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-13 15:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-13 15:18:19 UTC ---
Author: ktietz
Date: Mon Feb 13 15:18:14 2012
New Revision: 184155
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184155
Log:
PR libffi/52221
* src/x86/ffi.c (ffi_prep_raw_closure_loc): Add thiscall
support for X86_WIN32.
(FFI_INIT_TRAMPOLINE_THISCALL): Fix displacement.
Modified:
trunk/libffi/ChangeLog
trunk/libffi/src/x86/ffi.c
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
2012-02-12 17:58 ` [Bug libffi/52221] " ktietz at gcc dot gnu.org
2012-02-13 15:18 ` ktietz at gcc dot gnu.org
@ 2012-02-13 15:19 ` ktietz at gcc dot gnu.org
2012-02-13 17:02 ` jojelino at gmail dot com
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-13 15:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-13 15:18:58 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (2 preceding siblings ...)
2012-02-13 15:19 ` ktietz at gcc dot gnu.org
@ 2012-02-13 17:02 ` jojelino at gmail dot com
2012-02-13 18:35 ` jojelino at gmail dot com
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-13 17:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
gee <jojelino at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |WAITING
Resolution|FIXED |
--- Comment #4 from gee <jojelino at gmail dot com> 2012-02-13 17:02:18 UTC ---
(In reply to comment #3)
> Fixed.
No. it doesn't fixed. following debug session shows.
(gdb)
0x00fa0008 in ?? ()
(gdb) disp /5w $esp
6: x/5xw $esp
0x22fd7c: 0x696c5603 0x00e20e40 0x00a63fd0 0x00a63ff0
0x22fd8c: 0x00aa9848
(gdb) disp /w $ecx
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
^^^^^^^^
this parameter
(gdb) ni
0x00fa000b in ?? ()
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
6: x/5xw $esp
0x22fd7c: 0x696c5603 0x00e20e40 0x00a63fd0 0x00a63ff0
0x22fd8c: 0x00aa9848
(gdb) disp /i $eip
8: x/i $eip
=> 0xfa000b: sub $0xc,%esp
(gdb) ni
0x00fa000e in ?? ()
8: x/i $eip
=> 0xfa000e: mov %ecx,0x4(%esp)
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
6: x/5xw $esp
0x22fd70: 0x00e20e40 0x00ace300 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa0012 in ?? ()
8: x/i $eip
=> 0xfa0012: mov %eax,(%esp)
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
6: x/5xw $esp
0x22fd70: 0x00e20e40 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa0015 in ?? ()
8: x/i $eip
=> 0xfa0015: mov $0x4,%eax
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa001a in ?? ()
8: x/i $eip
=> 0xfa001a: lea 0x8(%esp),%ecx
7: x/xw $ecx 0xaa7e00: 0x00a6dc20
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa001e in ?? ()
8: x/i $eip
=> 0xfa001e: shr $0x2,%eax
7: x/xw $ecx 0x22fd78: 0x0022fda8
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa0021 in ?? ()
8: x/i $eip
=> 0xfa0021: dec %eax
7: x/xw $ecx 0x22fd78: 0x0022fda8
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa0022 in ?? ()
8: x/i $eip
=> 0xfa0022: je 0xfa002f
7: x/xw $ecx 0x22fd78: 0x0022fda8
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa002f in ?? ()
8: x/i $eip
=> 0xfa002f: mov $0xfa0008,%eax
7: x/xw $ecx 0x22fd78: 0x0022fda8
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
(gdb)
0x00fa0034 in ?? ()
8: x/i $eip
=> 0xfa0034: call 0x69ce18e0 <ffi_closure_raw_SYSV>
7: x/xw $ecx 0x22fd78: 0x0022fda8
6: x/5xw $esp
0x22fd70: 0x696c5603 0x00aa7e00 0x0022fda8 0x696c5603
0x22fd80: 0x00e20e40
Kai Tietz, could you explain why return address (0x696c5603) is at top of the
stack? (although it is not first argument for the method? i suspect that you
should have corrected this.)
top of the stack must be 0x00aa7e00, not 0x696c5603.
so it is turned out that thiscall trampoline code was invalid.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (3 preceding siblings ...)
2012-02-13 17:02 ` jojelino at gmail dot com
@ 2012-02-13 18:35 ` jojelino at gmail dot com
2012-02-13 21:06 ` ktietz at gcc dot gnu.org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-13 18:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #5 from gee <jojelino at gmail dot com> 2012-02-13 18:35:18 UTC ---
Created attachment 26653
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26653
proposed patch
sorry for pr51500 attachment 26584, it was very bad idea.
thiscall trampoline uses call insn so it needed to create related stub
function.
i was releutant to create stub function in win32.S and it resulted in disaster.
in this patch these problem is considered.
and thiscall trampoline subs esp and then call fun, this is bad idea. it works
only when #of argument is 1.(passed only this)
already i encountered the problem that are described above.
`/tmp/gcc/i686-pc-mingw32/libjava/.libs/libgcj-13.dll' has changed; re-reading
symbols.
Starting program: /tmp/gcc/i686-pc-mingw32/libjava/testsuite/ExtraClassLoader
[New Thread 5276.0x19bc]
Breakpoint 5, java::lang::Class::newInstance (this=0xe20e40)
at ../.././libjava/java/lang/natClass.cc:667
667 ((void (__thiscall *) (jobject)) meth->ncode) (r);
(gdb)
Continuing.
Program received signal SIGSEGV, Segmentation fault.
_Jv_GetStringUTFLength (string=0x69e61688)
at ../.././libjava/java/lang/natString.cc:324
324 jchar ch = *ptr++;
in this case string parameter is wrong.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (4 preceding siblings ...)
2012-02-13 18:35 ` jojelino at gmail dot com
@ 2012-02-13 21:06 ` ktietz at gcc dot gnu.org
2012-02-15 21:43 ` [Bug libffi/52221] [libffi] r183675,r184021 " jojelino at gmail dot com
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-13 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-13 21:05:45 UTC ---
hmm,
would you mind to provide a patch against current gcc's trunk?
Regards,
Kai
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (5 preceding siblings ...)
2012-02-13 21:06 ` ktietz at gcc dot gnu.org
@ 2012-02-15 21:43 ` jojelino at gmail dot com
2012-02-16 20:20 ` jojelino at gmail dot com
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-15 21:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
gee <jojelino at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[libffi] r184021 needs to |[libffi] r183675,r184021
|be fixed. |needs to be fixed.
Severity|normal |blocker
--- Comment #7 from gee <jojelino at gmail dot com> 2012-02-15 21:32:10 UTC ---
there is an big mistake in r183675
- ffi_call_win32(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
- ecif.rvalue, fn);
+ ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
+ ecif.rvalue, fn);
and below the mistake, another one.
+ if (passed_regs < 2 && abi == FFI_FASTCALL)
+ abi = FFI_THISCALL;
+ if (passed_regs < 1 && abi == FFI_THISCALL)
+ abi = FFI_STDCALL;
+ ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
+ ecif.rvalue, fn);
+ }
why ffi_prep_args_raw changed to ffi_prep_args?? this explains why i succeed
but not sigsegving in ExtraClassLoader.
because of this, i decidec to raise the severity to blocker.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (6 preceding siblings ...)
2012-02-15 21:43 ` [Bug libffi/52221] [libffi] r183675,r184021 " jojelino at gmail dot com
@ 2012-02-16 20:20 ` jojelino at gmail dot com
2012-02-16 21:01 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-16 20:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #8 from gee <jojelino at gmail dot com> 2012-02-16 20:12:21 UTC ---
Created attachment 26685
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26685
proposed patch
with this patch, ExtraClassLoader testcase passed with three `true'
testing for whole libjava testsuite.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (7 preceding siblings ...)
2012-02-16 20:20 ` jojelino at gmail dot com
@ 2012-02-16 21:01 ` ktietz at gcc dot gnu.org
2012-02-16 21:06 ` jojelino at gmail dot com
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-16 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-16 20:37:28 UTC ---
I see here three issues about this patch.
First, you don't treat stack-alignment.
Second, why you emulate here stack-argument cleanup for ret __size-4? Why not
stick to already present variant?
Thirs, you corrupt arguments after the second.
That this patch works for you might be true, but it is for sure in general
wrong.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (8 preceding siblings ...)
2012-02-16 21:01 ` ktietz at gcc dot gnu.org
@ 2012-02-16 21:06 ` jojelino at gmail dot com
2012-02-16 23:35 ` jojelino at gmail dot com
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-16 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
gee <jojelino at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26653|0 |1
is obsolete| |
--- Comment #9 from gee <jojelino at gmail dot com> 2012-02-16 20:19:22 UTC ---
Created attachment 26686
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26686
script used for generating trampoline code.
trampoline code in attachment 26685 based on following source code.
extern int* esp asm ("%esp");
volatile int
sideeffect();
static volatile int ctx;
int __cdecl
main()
{
int ret;
extern int ecx asm("%ecx");
/*
* CFLAGS -O4
*/
#define NUM_CLOBBERED_REG 1
/* expected layout
/* ret esp[4]
* ? esp[3]
* clobbered
*/
asm volatile("blk1:");
#define swap(x,y,tmp,...) {\
asm ("movl %0,%2 # movl x,tmp\n\
movl %1,%0 # movl y,x\n\
movl %2,%1 # movl tmp,y":"+g"(x),"+g"(y),"+g"(tmp)::__VA_ARGS__);\
}
swap(esp[NUM_CLOBBERED_REG+1], ecx, esp[NUM_CLOBBERED_REG], "ecx");
/* expected layout
* ecx esp[4]
* ret esp[3]
* clobbered
*/
asm ("movl %0,%%eax"::"i"(&ctx):"eax");
esp -= NUM_CLOBBERED_REG + 1;
asm volatile ("call _sideeffect":"+a"(ret)::"memory","ecx","edx");
ecx = esp[NUM_CLOBBERED_REG + 1];
esp[NUM_CLOBBERED_REG + 1] = esp[NUM_CLOBBERED_REG];
/* expected layout
* ret esp[4]
* ret esp[3]
* clobbered
*/
esp += NUM_CLOBBERED_REG + 1;
asm volatile("ret");
asm volatile("blk2:");
return ret;
}
volatile int
sideeffect()
{
return (volatile int) 0;
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (9 preceding siblings ...)
2012-02-16 21:06 ` jojelino at gmail dot com
@ 2012-02-16 23:35 ` jojelino at gmail dot com
2012-02-17 8:39 ` jojelino at gmail dot com
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-16 23:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #11 from gee <jojelino at gmail dot com> 2012-02-16 23:19:45 UTC ---
(In reply to comment #8)
> Created attachment 26685 [details]
> proposed patch
>
> with this patch, ExtraClassLoader testcase passed with three `true'
> testing for whole libjava testsuite.
Running /tmp/gcc/libjava/testsuite/libjava.cni/cni.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jar/jar.exp ...
FAIL: TestClosureGC output
FAIL: libjava.jar/TestClosureGC.jar execution - gij test
FAIL: simple output
FAIL: libjava.jar/simple.jar execution - gij test
Running /tmp/gcc/libjava/testsuite/libjava.jni/jni.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jvmti/jvmti-interp.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jvmti/jvmti.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.lang/lang.exp ...
FAIL: ProxyTest -O3 execution - source compiled test
FAIL: ProxyTest -O3 -findirect-dispatch execution - source compiled test
FAIL: StackTrace2 output - source compiled test
FAIL: StackTrace2 -findirect-dispatch output - source compiled test
FAIL: StackTrace2 -O3 output - source compiled test
FAIL: StackTrace2 -O3 -findirect-dispatch output - source compiled test
FAIL: TestProxy -O3 execution - source compiled test
FAIL: TestProxy -O3 -findirect-dispatch execution - source compiled test
FAIL: Thread_Sleep output - source compiled test
FAIL: Thread_Sleep -findirect-dispatch output - source compiled test
FAIL: Thread_Sleep -O3 output - source compiled test
FAIL: Thread_Sleep_2 output - source compiled test
FAIL: Thread_Sleep_2 -findirect-dispatch output - source compiled test
FAIL: Thread_Sleep_2 -O3 output - source compiled test
FAIL: Thread_Sleep_2 -O3 -findirect-dispatch output - source compiled test
FAIL: md5test execution - source compiled test
FAIL: md5test -findirect-dispatch execution - source compiled test
FAIL: md5test -O3 execution - source compiled test
FAIL: md5test -O3 -findirect-dispatch execution - source compiled test
FAIL: pr21785 execution - source compiled test
FAIL: pr21785 -findirect-dispatch execution - source compiled test
FAIL: pr21785 -O3 execution - source compiled test
FAIL: pr21785 -O3 -findirect-dispatch execution - source compiled test
FAIL: pr26990 execution - source compiled test
FAIL: pr26990 -findirect-dispatch execution - source compiled test
FAIL: pr26990 -O3 execution - source compiled test
FAIL: pr26990 -O3 -findirect-dispatch execution - source compiled test
FAIL: shatest execution - source compiled test
FAIL: shatest -findirect-dispatch execution - source compiled test
FAIL: shatest -O3 execution - source compiled test
FAIL: shatest -O3 -findirect-dispatch execution - source compiled test
Running /tmp/gcc/libjava/testsuite/libjava.loader/loader.exp ...
FAIL: TestMultiple output - source compiled test
FAIL: TestParent output - source compiled test
Running /tmp/gcc/libjava/testsuite/libjava.mauve/mauve.exp ...
sh: /configure: No such file or directory
FAIL: Mauve configure
Running /tmp/gcc/libjava/testsuite/libjava.special/special.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.verify/verify.exp ...
md5test~shatest has dependency to pr51901.
there is no sigsegv except TestProxy,ProxyTest
in pr52051 it was described
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (10 preceding siblings ...)
2012-02-16 23:35 ` jojelino at gmail dot com
@ 2012-02-17 8:39 ` jojelino at gmail dot com
2012-02-17 9:07 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-17 8:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #12 from gee <jojelino at gmail dot com> 2012-02-17 08:38:01 UTC ---
Created attachment 26692
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26692
proposed patch without trampoline diff
(In reply to comment #10)
> I see here three issues about this patch.
>
> First, you don't treat stack-alignment.
> Second, why you emulate here stack-argument cleanup for ret __size-4? Why not
> stick to already present variant?
> Thirs, you corrupt arguments after the second.
>
yes. sorry for unnecessary trampoline diff. does this patch solves the issues?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (11 preceding siblings ...)
2012-02-17 8:39 ` jojelino at gmail dot com
@ 2012-02-17 9:07 ` ktietz at gcc dot gnu.org
2012-02-22 18:23 ` jojelino at gmail dot com
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-17 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #13 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-17 09:03:02 UTC ---
Yes, this looks better IMHO. Btw any differences about libjava testsuite run
about this altered libffi patch?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (12 preceding siblings ...)
2012-02-17 9:07 ` ktietz at gcc dot gnu.org
@ 2012-02-22 18:23 ` jojelino at gmail dot com
2012-02-23 21:04 ` ktietz at gcc dot gnu.org
2012-02-23 21:28 ` ktietz at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: jojelino at gmail dot com @ 2012-02-22 18:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #14 from gee <jojelino at gmail dot com> 2012-02-22 18:13:35 UTC ---
(In reply to comment #13)
> Yes, this looks better IMHO. Btw any differences about libjava testsuite run
> about this altered libffi patch?
WARNING: Couldn't find the global config file.
Test Run By Administrator on Thu Feb 23 01:18:02 2012
Target is i686-pc-mingw32
Host is i686-pc-mingw32
Build is i686-pc-cygwin
=== libjava tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /tmp/gcc/libjava/testsuite/config/default.exp as tool-and-target-specific
interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /tmp/gcc/libjava/testsuite/libjava.cni/cni.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jar/jar.exp ...
FAIL: TestClosureGC output
FAIL: libjava.jar/TestClosureGC.jar execution - gij test
FAIL: simple output
FAIL: libjava.jar/simple.jar execution - gij test
Running /tmp/gcc/libjava/testsuite/libjava.jni/jni.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jvmti/jvmti-interp.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.jvmti/jvmti.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.lang/lang.exp ...
FAIL: StackTrace2 output - source compiled test
FAIL: StackTrace2 -findirect-dispatch output - source compiled test
FAIL: StackTrace2 -O3 output - source compiled test
FAIL: StackTrace2 -O3 -findirect-dispatch output - source compiled test
FAIL: Thread_Sleep output - source compiled test
FAIL: Thread_Sleep_2 output - source compiled test
FAIL: Thread_Sleep_2 -findirect-dispatch output - source compiled test
FAIL: Thread_Sleep_2 -O3 output - source compiled test
FAIL: Thread_Sleep_2 -O3 -findirect-dispatch output - source compiled test
FAIL: md5test execution - source compiled test
FAIL: md5test -findirect-dispatch execution - source compiled test
FAIL: md5test -O3 execution - source compiled test
FAIL: md5test -O3 -findirect-dispatch execution - source compiled test
FAIL: pr21785 execution - source compiled test
FAIL: pr21785 -findirect-dispatch execution - source compiled test
FAIL: pr21785 -O3 execution - source compiled test
FAIL: pr21785 -O3 -findirect-dispatch execution - source compiled test
FAIL: pr26990 execution - source compiled test
FAIL: pr26990 -findirect-dispatch execution - source compiled test
FAIL: pr26990 -O3 execution - source compiled test
FAIL: pr26990 -O3 -findirect-dispatch execution - source compiled test
FAIL: shatest execution - source compiled test
FAIL: shatest -findirect-dispatch execution - source compiled test
FAIL: shatest -O3 execution - source compiled test
FAIL: shatest -O3 -findirect-dispatch execution - source compiled test
Running /tmp/gcc/libjava/testsuite/libjava.loader/loader.exp ...
FAIL: TestMultiple output - source compiled test
FAIL: TestParent output - source compiled test
Running /tmp/gcc/libjava/testsuite/libjava.mauve/mauve.exp ...
sh: /configure: No such file or directory
FAIL: Mauve configure
Running /tmp/gcc/libjava/testsuite/libjava.special/special.exp ...
Running /tmp/gcc/libjava/testsuite/libjava.verify/verify.exp ...
=== libjava Summary ===
# of expected passes 2360
# of unexpected failures 32
# of untested testcases 18
Makefile:385: recipe for target `check-DEJAGNU' failed
make[1]: *** [check-DEJAGNU] Error 1
make[1]: Leaving directory `/tmp/gcc/i686-pc-mingw32/libjava/testsuite'
Makefile:409: recipe for target `check-am' failed
make: *** [check-am] Error 2
no problem with attachment 26692. please apply this.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (13 preceding siblings ...)
2012-02-22 18:23 ` jojelino at gmail dot com
@ 2012-02-23 21:04 ` ktietz at gcc dot gnu.org
2012-02-23 21:28 ` ktietz at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-23 21:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
--- Comment #15 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-23 21:02:32 UTC ---
Author: ktietz
Date: Thu Feb 23 21:02:27 2012
New Revision: 184526
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184526
Log:
PR libffi/52221
* src/x86/ffi.c (ffi_closure_raw_THISCALL): New
prototype.
(ffi_prep_raw_closure_loc): Use ffi_closure_raw_THISCALL for
thiscall-convention.
(ffi_raw_call): Use ffi_prep_args_raw.
* src/x86/win32.S (ffi_closure_raw_THISCALL): Add
implementation for stub.
Modified:
trunk/libffi/ChangeLog
trunk/libffi/src/x86/ffi.c
trunk/libffi/src/x86/win32.S
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libffi/52221] [libffi] r183675,r184021 needs to be fixed.
2012-02-12 17:22 [Bug libffi/52221] New: [libffi] r184021 needs to be fixed jojelino at gmail dot com
` (14 preceding siblings ...)
2012-02-23 21:04 ` ktietz at gcc dot gnu.org
@ 2012-02-23 21:28 ` ktietz at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-02-23 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52221
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
--- Comment #16 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-23 21:03:44 UTC ---
Fixed
^ permalink raw reply [flat|nested] 17+ messages in thread