Closed osmanfb closed 2 years ago
I'm also running into a similar problem, but am getting a segfault around label gts26 with just a simple:
x = 2.0 'a' end
I think I might know what is going on and I'm investigating a solution (possible misplacement of a read-write area into a read only segment)
Found the problem and have a fix. It wasn't what I had thought above.
Some of the internal calls to C functions from the assembly code need to preserve some registers that get clobbered (I believe that this might be a Linux vs Windows difference).
Adding a couple of pushes prior to the calls and pops afterwards appears to fix the problem.
Pull Request #15 I believe fixes the problem. The branch contains some of the other patches that I've worked on and includes some general (and minor) build cleanup.
Thanks for looking into and fixing but how long does it take github to update the master branch? I just cloned the master into a new folder and float.sbl still causing the underflow.
Thanks for looking into and fixing but how long does it take github to update the master branch? I just cloned the master into a new folder and float.sbl still causing the underflow.
I'm waiting to hear back from Dave Shields who has commit authority. In the meantime you can use what's in the above pull request.
I did. I changed sbl.asm, int.asm, int.dcl as the diffs showed. same problem. looks like clobbering happens on the output = statements, Variable calculations of any complexity that I tried worked ok as long as the output statement did not contain any float ops. I also cloned bootstrap and it did not work either. Looks like the above asm and dcl files are created each time make is executed. So the changes are overwritten. Since I don't know what I'm doing, I'll wait until master is updated.
Cheyenne,
Thanks for all your work. I reviewed your prior emails and noted that I invited to to become a committer on November 4, so please feel free to pull your patches into the master.
thanks, dave
On Wed, Dec 29, 2021 at 12:49 PM osmanfb @.***> wrote:
I did. I changed sbl.asm, int.asm, int.dcl as the diffs showed. same problem. looks like clobbering happens on the output = statements, Variable calculations of any complexity that I tried worked ok as long as the output statement did not contain any float ops. I also cloned bootstrap and it did not work either. Looks like the above asm and dcl files are created each time make is executed. So the changes are overwritten.
— Reply to this email directly, view it on GitHub https://github.com/spitbol/x64/issues/14#issuecomment-1002708618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARPPNSMSPAM5H2EONPKX3UTNC3NANCNFSM5KTYG3AA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
Cheyenne, Thanks for all your work. I reviewed your prior emails and noted that I invited to to become a committer on November 4, so please feel free to pull your patches into the master. thanks, dave
Thanks Dave. It appears that I don't have write access to the spitbol/x64 repository, just read access so I can't complete the pull request.
Cheyenne,
Right you are. Sorry about that.
I just changed your role to Owner. I think that should do it.
dave
On Sun, Jan 2, 2022 at 9:50 AM Cheyenne Wills @.***> wrote:
Cheyenne, Thanks for all your work. I reviewed your prior emails and noted that I invited to to become a committer on November 4, so please feel free to pull your patches into the master. thanks, dave
Thanks Dave. It appears that I don't have write access to the spitbol/x64 repository, just read access so I can't complete the pull request.
— Reply to this email directly, view it on GitHub https://github.com/spitbol/x64/issues/14#issuecomment-1003727373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARPPIRAYIG7A624TGDJE3UUBQ4VANCNFSM5KTYG3AA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
The fix is now in master.
::sigh:: still a minor problem (probably a missed call).
FYI,
sanity-check doesn't test or require any floating point arithmetic, since SPITBOL can be configured to not support floating point arithmetic. It just checks that the system is capable of rebuilding itself, and that the rebuilt system can also rebuild itself. All this is to make sure some nasty bug doesn't creep in only to show up later.
thanks, dave
On Mon, Jan 3, 2022 at 12:36 PM Cheyenne Wills @.***> wrote:
::sigh:: still a minor problem (probably a missed call).
— Reply to this email directly, view it on GitHub https://github.com/spitbol/x64/issues/14#issuecomment-1004247310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARPPPTXOL4MURBNUKWVFLUUHNBFANCNFSM5KTYG3AA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I found the problem with the floating point. There needed to be some checks for floating point "problems" with some of the operations (+-/*). I have a "fix" for that as well..
New PR coming in for that..
PR #16 should better handle the problem with some floating point operations.
I was getting the error: "test/float.sbl(9) : error 264 -- subtraction caused real overflow". The above PR should fix that.
as of Jan 04, 2 pm the master branch still causing the floating point exception. I checked that having bunch of lines of float operations does not cause the exception. But multiple "output = " with floats does. x = 2.0 y = 5.0 z = x + y ( y - 1.0) w = x y * z output = w output = x output = x + y end the last output cause an exception. If taken out runs ok.
as of Jan 04, 2 pm the master branch still causing the floating point exception. I checked that having bunch of lines of float operations does not cause the exception. But multiple "output = " with floats does. x = 2.0 y = 5.0 z = x + y ( y - 1.0) w = x y * z output = w output = x output = x + y end the last output cause an exception. If taken out runs ok.
I've merged the latest changes (PR #16) into master.
thanks Cheyenne. master is working ok now (Jan 6, 00:28). The only thing is the pre-built bin/sbl is causing "illegal instruction" and maybe should not be included. Also a few lines could be added to the README to do a make bootsbl first and then follow with make BASEBOL=./bootsbl and finally make bininst to copy the sbl to the bin directory.
I built the x64 spitbol on my ubuntu 18.04 laptop. Building and running sanitychecjk went ok and I installed it. But trying it on the files in the test subdirectory, I am having a problem with float.sbl file. ../sbl float.sbl
test/float_orig.sbl(9) : error 264 -- subtraction caused real overflow
in file test/float_orig.sbl in line 9 in statement 9 stmts executed 9 execution time msec 0 in line 0 memory used (bytes) 12792 memory left (bytes) 249344
same thing happens with the spitbol executable from the bin subdir.. But if build the 32 bit version from github/x32 then that spitbol runs the float.sbl without any problems. Also if switch floats to integers, it also works. What could be the problem/where to look ??? TIA