Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

What we anticipate seldom occurs; what we least expect generally happens. -- Bengamin Disraeli


computers / comp.sys.apple2 / SANE Conversion Patch

SubjectAuthor
* SANE Conversion PatchStephen Heumann
`* Re: SANE Conversion PatchI am Rob
 `- Re: SANE Conversion PatchStephen Heumann

1
SANE Conversion Patch

<tvt7kd$3e0r4$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5230&group=comp.sys.apple2#5230

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: stephen....@gmail.com (Stephen Heumann)
Newsgroups: comp.sys.apple2
Subject: SANE Conversion Patch
Date: Mon, 27 Mar 2023 18:07:57 -0500
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <tvt7kd$3e0r4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="07ee3eb5081a78e7f6fc061de86c37d9";
logging-data="3605348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Wf6Uo0CuSIy8CXx3fxFGUR+7UA4xmZSY="
User-Agent: Unison/2.2
Cancel-Lock: sha1:LHAsHuQVlb/1sjpgIWi6Tq1yD+U=
 by: Stephen Heumann - Mon, 27 Mar 2023 23:07 UTC

I've just released a patch that fixes a bug in SANE (the Standard Apple
Numerics Environment) on the IIGS. The bug is that when SANE is used
to convert a number from a floating-point type to an integer type, it
may give the wrong result for certain numbers. Specifically, the
numbers that may be affected are certain negative multiples of 65536
(e.g. -8388608, -65536000, etc).

This is a pretty obscure issue, but I've run into it when working on
the floating-point code in the ORCA/C libraries, so I figured I'd make
a patch to fix it. The patch and documentation are available here:

https://github.com/sheumann/SANEConvPatch

The download also includes a test program that you can use to see some
examples of the conversion errors and confirm that they are fixed after
you apply the patch.

--
Stephen Heumann

Re: SANE Conversion Patch

<94c74723-8fdf-4517-ae06-9c2565f73334n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5231&group=comp.sys.apple2#5231

  copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:ac8:59c8:0:b0:3e4:de7a:d532 with SMTP id f8-20020ac859c8000000b003e4de7ad532mr3446147qtf.13.1679967069570;
Mon, 27 Mar 2023 18:31:09 -0700 (PDT)
X-Received: by 2002:a05:622a:189b:b0:3d7:8712:a808 with SMTP id
v27-20020a05622a189b00b003d78712a808mr5303016qtc.1.1679967069403; Mon, 27 Mar
2023 18:31:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Mon, 27 Mar 2023 18:31:09 -0700 (PDT)
In-Reply-To: <tvt7kd$3e0r4$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=207.195.86.7; posting-account=U4TNXwoAAABP4nIJHynAJZ69O_f3LY2g
NNTP-Posting-Host: 207.195.86.7
References: <tvt7kd$3e0r4$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <94c74723-8fdf-4517-ae06-9c2565f73334n@googlegroups.com>
Subject: Re: SANE Conversion Patch
From: gids...@sasktel.net (I am Rob)
Injection-Date: Tue, 28 Mar 2023 01:31:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1297
 by: I am Rob - Tue, 28 Mar 2023 01:31 UTC

I believe there was another SANE patch at one time. What did that one fix?

And what Applications might I run into problems with, without the patch?

Re: SANE Conversion Patch

<tvtim8$3igrc$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5232&group=comp.sys.apple2#5232

  copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: stephen....@gmail.com (Stephen Heumann)
Newsgroups: comp.sys.apple2
Subject: Re: SANE Conversion Patch
Date: Mon, 27 Mar 2023 21:16:40 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <tvtim8$3igrc$1@dont-email.me>
References: <tvt7kd$3e0r4$1@dont-email.me> <94c74723-8fdf-4517-ae06-9c2565f73334n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="07ee3eb5081a78e7f6fc061de86c37d9";
logging-data="3752812"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+b2TWreNAwzFdf8tBSOPAT6G/PVaryCXA="
User-Agent: Unison/2.2
Cancel-Lock: sha1:Kt1E+kol7yeCtc0NnW8nScz++XM=
 by: Stephen Heumann - Tue, 28 Mar 2023 02:16 UTC

On 2023-03-28 01:31:09 +0000, I am Rob said:

> I believe there was another SANE patch at one time. What did that one fix?

There was a patch called SANE.Fix that was meant to fix a different
SANE bug that existed in System 6.0 and earlier. That bug was fixed in
System 6.0.1, so SANE.Fix is no longer necessary. (See my patch's
README for some more details.)

> And what Applications might I run into problems with, without the patch?

I'm not aware of any specific application that triggers this bug.
Realistically, it's pretty unlikely that any program you use will do
these specific conversion operations on these specific numbers (which
is probably why nobody found and fixed the bug before).

That said, it definitely is possible to trigger it, e.g. by doing type
casts from floating-point to integer types in C code, and you might not
even know if some program is giving incorrect results because of this
issue.

--
Stephen Heumann

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor