I think I know how to fix one of them, I'll post an updated 'as_callfunc_x64_gcc.cpp' soon
// moments later:
Ok, here is a new version of 'as_callfunc_x64_gcc.cpp': http://pastebin.com/m379d3ec8
It fixes this valgrind-detected problem:
==10404== Invalid write of size 8==10404== at 0x4C5181: CallSystemFunction(int, asCContext*, void*) (as_callfunc_x64_gcc.cpp:616)==10404== by 0x47FA0D: asCContext::ExecuteNext() (as_context.cpp:2044)==10404== by 0x483E2B: asCContext::Execute() (as_context.cpp:1096)==10404== by 0x4A223F: asCScriptEngine::ExecuteString(char const*, char const*, asIScriptContext**, unsigned int) (as_scriptengine.cpp:2501)==10404== by 0x452A10: TestVector3_2::Test() (test_vector3_2.cpp:130)==10404== by 0x404DE8: main (main.cpp:250)==10404== Address 0x641da70 is 8 bytes inside a block of size 12 alloc'd==10404== at 0x4C23CFE: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)==10404== by 0x464DD9: MyAllocWithStats(unsigned long, char const*, int) (utils.cpp:93)==10404== by 0x496FD3: asCScriptEngine::CallAlloc(asCObjectType*) (as_scriptengine.cpp:2994)==10404== by 0x4C44B7: CallSystemFunction(int, asCContext*, void*) (as_callfunc_x64_gcc.cpp:290)==10404== by 0x47FA0D: asCContext::ExecuteNext() (as_context.cpp:2044)==10404== by 0x483E2B: asCContext::Execute() (as_context.cpp:1096)==10404== by 0x4A223F: asCScriptEngine::ExecuteString(char const*, char const*, asIScriptContext**, unsigned int) (as_scriptengine.cpp:2501)==10404== by 0x452A10: TestVector3_2::Test() (test_vector3_2.cpp:130)==10404== by 0x404DE8: main (main.cpp:250)