in reply to Re^5: GIMME_V==G_ARRAY anomaly on win32 (5.10 only)
in thread GIMME_V==G_ARRAY anomaly on win32 (5.10 only)
Grepping the CORE directory I get in all 3 perls
lib\CORE/op.h:#define GIMME_V OP_GIMME(PL_op, block_gim +me())
What matters is not no much that the macro #define doesn't differ, but what machine code the compiler has generated for it. After full macro expansion, the GIMME_V macro looks like:
((((*Perl_Top_ptr(((PerlInterpreter *)pthread_getspecific((*Perl_Gthr_ +key_ptr(((void *)0))))))))->op_flags & 3) == 1 ? 128 : (((*Perl_Top_p +tr(((PerlInterpreter *)pthread_getspecific((*Perl_Gthr_key_ptr(((void + *)0))))))))->op_flags & 3) == 2 ? 0 : (((*Perl_Top_ptr(((PerlInterpr +eter *)pthread_getspecific((*Perl_Gthr_key_ptr(((void *)0))))))))->op +_flags & 3) == 3 ? 1 : Perl_block_gimme(((PerlInterpreter *)pthread_g +etspecific((*Perl_Gthr_key_ptr(((void *)0))))))))
(this is for a threaded 5.8.8 — replace cc -c ... with cc -E ... in the compiler call issued by Inline::C to obtain the respective snippet for whatever Perl version you're interested in)
As you can see, some Perl-internal functions/structures are being accessed. And problems may arise if the machine code for this macro generated by the compiler used to compile the extension DLL does not address memory as layed out by the compiler(+options) that compiled the perl DLL (for example, op_flags might be aligned differently (just for the sake of argument — not saying this is necessarily the issue in this particular case)).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: GIMME_V==G_ARRAY anomaly on win32 (5.10 only)
by Anonymous Monk on Dec 19, 2009 at 19:53 UTC | |
|
Re^7: GIMME_V==G_ARRAY anomaly on win32 (5.10 only)
by syphilis (Archbishop) on Dec 19, 2009 at 22:31 UTC |