make test in master fail - json
Matthew Newton
mcn4 at leicester.ac.uk
Wed Sep 16 01:57:42 CEST 2015
On Tue, Sep 15, 2015 at 07:34:49PM +0100, Arran Cudbard-Bell wrote:
> >> The comments about json-c < 0.10 are because 0.10 was the first get support
> >> for 64 bit integers (supposedly).
> >
> > Righto. Looks suspiciously like "supposedly" :)
>
> Weird weird things.
>
> Can you test on your system as see if all JSON integer values produce INT32_MAX/INT32_MIN/INT64_MAX/INT64_MIN?
Don't think so - this passes:
update request {
&Tmp-String-0 := "\
[\
4, \
-9, \
1 \
]"
}
map json &Tmp-String-0 {
&Tmp-Integer-7 := '$[0]'
}
if (&Tmp-Integer-7 == "4") {
test_pass
} else {
test_fail
}
But if I use [9223372036854775807, -9223372036854775807, 18446744073709551615]
as the string, it fails:
Debug: (0) map json &Tmp-String-0 {
ERROR: (0) Failed evaluating jpath: Invalid cast from integer64 to integer
Debug: (0) } # map json &Tmp-String-0 = fail
So there doesn't seem to be a problem with 32bit ints.
I've got both amd64 and i386 versions of libjson installed:
$ dpkg --get-selections | grep libjson0
libjson0:amd64 install
libjson0:i386 install
libjson0-dev:amd64 install
$
so wondered if it had linked against the i386 one for some reason, but:
$ ldd /opt/fr31/lib/libfreeradius-json.so
linux-vdso.so.1 => (0x00007ffe363f4000)
libjson.so.0 => /lib/x86_64-linux-gnu/libjson.so.0 (0x00007fe7ea48e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe7ea103000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe7ea8bb000)
so that looks OK. Just ripped libjson0:i386 off and it's still the same error.
Matthew
--
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>
Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom
For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>
More information about the Freeradius-Devel
mailing list