axpbox icon indicating copy to clipboard operation
axpbox copied to clipboard

BUG(?) with math code

Open TheFausap opened this issue 4 years ago • 7 comments

Hello all,

I'm using the latest snapshot compiled under Mac OS X 10.13 and clang. I am using OpenVMS 8.4.2L1 Everything is ok. I noticed some weird output on the console when I am compiling some math code under C.

SUBL_V 0000000000000000x - 18446744071562067968x = 18446744071562067968x + TRAP
[repeated several times]

The build is ok. So I don't know if this is a real bug or not.

regards, Fausto

TheFausap avatar Nov 27 '20 21:11 TheFausap

If it's possible, could you please post the code you're trying to compile and the steps you take to compile it?

RaymiiOrg avatar Dec 01 '20 04:12 RaymiiOrg

Sorry for being vague, here is more context. I was trying to build the reflisp package (a lisp interpreter). The build seems ok, even if I got those messages on the axpbox console.

I compiled with the default options of CC command, i.e. CC/VERBOSE MATH.C

reflisp-bug.zip

TheFausap avatar Dec 01 '20 06:12 TheFausap

Just as an example... 9 seconds to calculate 2^300 and print it

$ run lisp
; reading init.lsp 
It's nearly a quarter past six . 

2241> (load "times.lsp")
t reading times.lsp 
2479> (load "bignum.lsp")
t reading bignum.lsp 
3037> (time:perf (b-power-of-2 300))
2 to the power 300 is: 2111184054019605320843855217622375819155724851118195321145199981676251345946484577202763776
9
3052>

it seems the math code is quite ok, anyway.

TheFausap avatar Dec 01 '20 06:12 TheFausap

I think that they need AXE tools and QVET tools to diagnose CPU processor and test instructions. QVET tools are available in ftp.hp.com (/pub/alphaserver/... ) I have some same problems as well. When I tried to list BCK files on DKA disk images, I got some CRC errors, etc. but was able list them from same BCK file on CDROM emulation with out any errors. etc..

fsword7 avatar Dec 01 '20 15:12 fsword7

I suppose this is not a sort of fatal error, maybe there could be some problem with some particular floating-point operation, but I suppose it will be quite difficult to debug. I am not familiar with QVET tool, I am sorry, but this only happens during the building, not at run-time, so I suppose this is also trickier to analyse.

TheFausap avatar Dec 01 '20 17:12 TheFausap

I don't think the CRC errors are related to the CPU behavior - based on the state of most peripherals' code I would rather suspect the bug being there. Also es40 was initially written single-threaded, only later it was rewritten to be multi-threaded, introducing both known bugs and potentially yet unknown bugs into the code.

lenticularis39 avatar Dec 01 '20 18:12 lenticularis39

I don't know very much about hardware, though, so I might be wrong.

lenticularis39 avatar Dec 01 '20 18:12 lenticularis39