GMP and Rational's Purify
Krzysztof Kozminski
Krzysztof.A.Kozminski@nsc.com
Fri, 03 Jan 2003 15:26:12 -0800
This is a multi-part message in MIME format.
--------------3AB3267E0C7A9BF5AC70C4FB
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Has anyone figured out whether it is possible to build GMP 4.1 or later under
Solaris so that it does not get broken once it is instrumented with Purify?
The last version of GMP that worked was 4.0.1.
I am using the latest Purify (2003.06, from Dec 2002) under Solaris 2.7, with
GCC 2.95.2 or 3.0.3, with the same failure mode.
Code & makefile to reproduce the problem attached in case someone wants to
give it a try.
The program is supposed to print "1" and it does, except when purified, when
it produces this nonsense:
1 specifies too many bits (4294967258), where 1 were expected.
It seems that the instrumented code overflows somewhere.
KK
--
"Divide by cucumber error. Please reinstall the Universe and reboot."
--------------3AB3267E0C7A9BF5AC70C4FB
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=Makefile
Content-Type: application/octet-stream;
name=Makefile
YWxsOiBnb29kIGJ1Z2d5CglAIGVjaG8gPT09PT09PT09PT09PT09PSBUaGlzIGlzIGEgZ29v
ZCBydW46Cglnb29kCglAIGVjaG8gPT09PT09PT09PT09PT09PSBUaGlzIGlzIGJ1Z2d5IHB1
cmlmaWVkIHJ1bgoJYnVnZ3kKCUAgZWNobyA9PT09PT09PT09PT09PT09IEVuZCBvZiB0aGUg
YnVnZ3kgcnVuCgoKZ29vZDogbWFpbi5DCglAIGVjaG8gY29tcGlsaW5nIHdpdGggYCBnKysg
LS12ZXJzaW9uYAoJZysrIC1JLiBtYWluLkMgbGliZ21wLmEgbGliZ21weHguYSAtbyBnb29k
CgpidWdneTogbWFpbi5DCglAIGVjaG8gY29tcGlsaW5nIHdpdGggYCBnKysgLS12ZXJzaW9u
YAoJcHVyaWZ5IGcrKyAtSS4gbWFpbi5DIGxpYmdtcC5hIGxpYmdtcHh4LmEgLW8gYnVnZ3kK
CmNsZWFuOgoJcm0gLWYgKi5vICpfcHVyZV8qIGdvb2QgYnVnZ3kgYS5vdXQKCg==
--------------3AB3267E0C7A9BF5AC70C4FB
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=main.C
Content-Type: application/octet-stream;
name=main.C
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8Z21weHgu
aD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJn
dltdKQp7CglpbnQgX3NpemUgPSAxOwoJc3RyaW5nIGFsbERpZ2l0cygiMSIpOwoJaW50IG1w
ekJhc2UgPSAyOwoJbXB6X2NsYXNzICogX2JpbmFyeSA9IG5ldyBtcHpfY2xhc3MoKTsKCWlm
IChfYmluYXJ5LT5zZXRfc3RyKGFsbERpZ2l0cyxtcHpCYXNlKSkgeyAKCQljZXJyIDw8IGFs
bERpZ2l0cyA8PCAiIGlzIG5vdCBhIHZhbGlkIG51bWJlciBpbiBiYXNlICIgPDwgbXB6QmFz
ZQoJCQk8PCBlbmRsOwoJCXJldHVybiAxOwoJfQoKCXNpemVfdCByZWFkU2l6ZSA9IG1wel9z
aXplaW5iYXNlKF9iaW5hcnktPmdldF9tcHpfdCgpLDMpOwoJaWYgKHJlYWRTaXplID4gX3Np
emUpIHsKCQltcHpfY2xhc3MgbW9kdWxvKDEpOwoJCW1vZHVsbyA8PD0gX3NpemU7CgkJKihf
YmluYXJ5KSAlPSBtb2R1bG87CgkJY2VyciA8PCBhbGxEaWdpdHMgPDwgIiBzcGVjaWZpZXMg
dG9vIG1hbnkgYml0cyAoIiA8PCByZWFkU2l6ZQoJCQk8PCAiKSwgd2hlcmUgIiA8PCBfc2l6
ZSA8PCAiIHdlcmUgZXhwZWN0ZWQuIjsKCQlyZXR1cm4gMTsKCX0KCgljb3V0IDw8IF9iaW5h
cnktPmdldF9zdHIoMTYpIDw8IGVuZGw7CglyZXR1cm4gMDsKfQo=
--------------3AB3267E0C7A9BF5AC70C4FB
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=Krzysztof.A.Kozminski.vcf
Content-Description: Card for Krzysztof Kozminski
Content-Type: text/x-vcard;
charset=iso-8859-1;
name=Krzysztof.A.Kozminski.vcf
YmVnaW46dmNhcmQgCm46S296bWluc2tpO0tyenlzenRvZgp0ZWw7Y2VsbDo0MDgtNzE4LTYw
NDAKdGVsO2ZheDo0MDgtNzczLTA5NzgKdGVsO2hvbWU6NDA4LTUzMS04NzY1CnRlbDt3b3Jr
OjQwOC03MjEtODI5MQp4LW1vemlsbGEtaHRtbDpUUlVFCnVybDpodHRwOi8vd3d3LWN0cy5u
c2MuY29tL35ray8Kb3JnOk5hdGlvbmFsIFNlbWljb25kdWN0b3IgQ29ycC47Q0FEIFRvb2xz
ICYgU29mdHdhcmUKdmVyc2lvbjoyLjEKZW1haWw7aW50ZXJuZXQ6S3J6eXN6dG9mLkEuS296
bWluc2tpQG5zYy5jb20KdGl0bGU6TWVtYmVyIG9mIFRlY2huaWNhbCBTdGFmZiAtIFNvZnR3
YXJlCmFkcjtxdW90ZWQtcHJpbnRhYmxlOjs7MjkwMCBTZW1pY29uZHVjdG9yIERyaXZlPTBE
PTBBTWFpbCBTdG9wIEQzLTY3NztTYW50YSBDbGFyYTtDQTs5NTA1Mi04MDkwO1VTQQpub3Rl
O3F1b3RlZC1wcmludGFibGU6aHR0cDovL3d3dy5rb3ptaW5za2kuY29tLyAocHVibGljKT0w
RD0wQWh0dHA6Ly93d3ctY3RzLm5zYy5jb20vfmtrLyAoZmlyZXdhbGxlZCkKeC1tb3ppbGxh
LWNwdDo7LTI4NTkyCmZuOktyenlzenRvZiBLb3ptaW5za2kKZW5kOnZjYXJkCg==
--------------3AB3267E0C7A9BF5AC70C4FB--