'ZeroDivide' error using debian package

bill-auger <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
On 08/11/2018 04:50 PM, Tommy Pettersson wrote:
> On 08/11/2018 04:25 PM, bill-auger wrote:
> > on debian 9:
> >
> > $ gst
> > st> x := 1e-4
> > Object: 1 error: The program attempted to divide a number by zero
> > ZeroDivide(Exception)>>signal (ExcHandling.st:254)
> > SmallInteger(Number)>>zeroDivide (SysExcept.st:1426)
> > Fraction>>setNumerator:setDenominator: (Fraction.st:485)
> > Fraction class>>numerator:denominator: (Fraction.st:66)
> > Fraction>>- (Fraction.st:151)
> > FloatE(Float)>>printOn:special: (Float.st:533)
> > FloatE(Float)>>printOn: (Float.st:436)
> > FloatE(Object)>>printString (Object.st:534)
> > FloatE(Object)>>printNl (Object.st:571)
> >
> >
> > $ gst --version
> > GNU Smalltalk version 3.2.5
>
>> I think the ZeroDivide exception is unrelated, and caused by your gst
being> compiled with option -pie (the default in many distros). If so,
you would> get the same exception for 0.05 and many other numbers. Try
compiling gst> with -no-pie to see if the exception goes away.> > /Tommy

yes - i see now it is a different problem - and 0.05 does give the same
'ZeroDivide' error

to be clear, my original result with the 'ZeroDivide' error was using
the official debian package - i do not see the 'ZeroDivide' problem when
compiling myself from git - but it is not clear that the -pie flag is
the cause - i will CC to the debian packaging team "Debian GNU Smalltalk
maintainers" as the deb package indicates; although i see it is (since
April 2018) listed as an inactive mailing list - if no response i will
file a bug report against the package

`gcc -v` and `g++ -v` both show --enable-default-pie; but i can not
expose the 'ZeroDivide' problem compiling myself - compiling with all of
the following flags produce the same (non-error) result for 1e-4 and 0.05:

$ make CFLAGS='-no-pie'
$ make CFLAGS='-pie'
$ make

$ /usr/local/bin/gst
GNU Smalltalk ready

st> 0.05
0.05

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE+8xa10IRl7erpyhTkIcQkT6Md3gFAltvcdIACgkQkIcQkT6M
d3jRAQgAsupg+MIlEOtOKOtNFpaIPk3lo5hGS0aXgP+MPUM4UYIG5KXVDSvGI339
8igcS3YAt11p/HVcPXEIo+urJt7oumGWIyiJYZcGcSoQDfNyNakACjMpe6Jzi0w1
cSMztZ14krBBXkSG0TdLfU9102/Cs6mJH6dCOPqEnw3ACgUbXy5qqLzh34Wjdkm4
zE5t2rZ1//4syglgj7CT0MtNTV97owvah424bJMuEMy+yFtNhFIPjhZp+7/Yq9Op
LrlzW6ht/cBHuY6wUtpK9FFd9uvlJU9kySdXQ+0IxQaM8oyPgOimhhAeZzoV9GxC
XO0lAAJcBXICCwPEWP0qWk9klA1rdA==
=dhDb
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.