Hello !
Testing your project with with the apk on android arm32 (nexus7) this program fail:
local ffi = require('ffi')
local buf = ffi.new('char[256]')
local c = ffi.C
ffi.cdef('int sprintf(char *buf, const char *fmt, ...);')
print(c.sprintf(buf, '%g', 5.3), ffi.string(buf));
Expected:
Output:
The above and the following are from the original test.lua and it also fail the following with segfault:
-- unsigned should be ignored for pointer rules
ffi.cdef([=[
int strncmp(const signed char *s1, const unsigned char *s2, size_t n);
]=]);
assert(ffi.C.strncmp("two", "three", 3) ~= 0); -- segfault here
...
-- Test io.tmpfile()
ffi.cdef ([=[
int fprintf ( FILE * stream, const char * format, ... );
]=]);
local f = io.tmpfile();
ffi.C.fprintf(f, "test: %s\n", "foo"); -- segfault here
f:seek("set", 0);
local str = f:read('*l');
assert(str == 'test: foo', str);
f:close();
Commenting the above mentioned tests all the rest of test.lua pass.
Great work !
Hello !
Testing your project with with the apk on android arm32 (nexus7) this program fail:
Expected:
Output:
The above and the following are from the original test.lua and it also fail the following with segfault:
Commenting the above mentioned tests all the rest of test.lua pass.
Great work !