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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to