I ran into this with SQLite3 3.5.4:

printf-8.2...
Expected: [2147483647 2147483648 4294967295]
     Got: [2147483647 18446744071562067968 18446744073709551615]

The code looks like:


...
do_test printf-8.2 {
  sqlite3_mprintf_int {%lu %lu %lu} 0x7fffffff 0x80000000 0xffffffff
} {2147483647 2147483648 4294967295}
...

where sqlite3_mprintf_int() is a Tcl function written in C that passes
signed ints to a printf-like function with a format string that uses
%lu.  I think here we have sign extension going on.  To me it seems
clear that there's a bug in sqlite3_mprintf_int() -- why use %lu?

Interenstingly I don't get the same failure on Solaris on x86/64
64-bit.  Odd.

I should point out, I suppose, that Solaris is ILP32 and LP64 on all
architectures.

Nico
-- 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to