From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 9 Jul 93 19:57:11 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: Weird error using SunAda Message-ID: List-Id: In article mac@dit.upm.es (M. Alvarez-Camp ana) writes: When I run the program I get a 'Bus error (core dumped)' message and the program aborts. Using the debugger I get: a.db example >r example "Bus error" [10] --> Hardware alignment error stopped 1 instruction after "/tmp/topnet-sublib/xs_kernel.a":130 in deposit '3 130 if TM /= 0.0 then Normally I would say it's time to exercise your compiler support contract, but there may be enough information here to diagnose the problem... The SPARC architecture has fairly severe memory alignment requirements. In particular requiring 64-bit values to be doubleword (64-bit/8-byte) aligned in memory. Thirty-two bit values must be word aligned, 16-bit values half-word aligned. The VAX on the other hand, is willing to reference any object at any byte boundary. The SunAda compiler does allow you to "shoot yourself in the foot" by misaligning floating point values in records. Usually you have to ask for trouble with alignment or record representation clauses, but it might be possible to cause the problem by nesting records. In any case, a priority 10 trap is mem_address_not_aligned, and I suspect that the bad reference is in line 131. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...