home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!pipex!harlqn.co.uk!harlqn!jont
- From: jont@harlqn.co.uk (Jon Thackray)
- Subject: Register windows and non-determinacy on Sparc
- Message-ID: <JONT.92Nov12144657@ml.harlqn.co.uk>
- Lines: 44
- Sender: news@harlqn.co.uk (Usenet News Account)
- Organization: Harlequin Limited, Cambridge, England
- Date: Thu, 12 Nov 1992 14:46:57 GMT
-
- I have what I think is a non-determinacy problem with Sparc register
- windows when running user programs on a Sun 4/330 with SunOS 4.1.1.
- Perhaps some kind reader of this group can help. The problem concerns
- values in registers which will become visible after one or more saves.
- The reason I am asking about this is because I have spent some time
- trying to use adb to track a problem in a garbage collected language
- implementation, and it appears that the use of adb, or perhaps just
- context switching actually hides the problem. The conditions are
- roughly as follows:-
- At the bottom of a sequence of procedure calls, each of which acquires
- a new register window via save, a bad value (as far as the garbage
- collector is concerned) gets put in to a register. The code then
- returns several stack levels and sets off down another sequence of
- procedure calls, eventually entering the garbage collector. The
- garbage collector performs two saves, and a flush_windows trap to
- force all register contents onto the stack so it can scan them and fix
- them up. One of the registers flushed onto the stack in this way is the
- aforementioned bad value. The problem arises if I try to use adb to
- stop somewhere just before the garbage collection. In this case the
- bad value doesn't appear on the stack when the garbage collector is
- entered, instead a 0 (zero) appears there. This suggests that the
- register values appearing when saves are done may be modified in a way
- which has nothing to do with the program running. Before starting the
- program the register windows not yet visible are cleaned using a
- clean_windows trap, and the same happens whenever the runtime system
- returns to the compiled code. Can the OS, in some asynchronous way,
- also clean the registers between the current window pointer and the
- window overflow mark? Anyone got any alternative suggestions as to
- what is going on?
-
- Incidentally, I've found the source of the original problem, which was
- a piece of the runtime system failing to clear out a bad value it had
- created, I'm much more interested in knowing why adb removed the
- evidence whenever I tried to look at it.
-
- Replies by email preferred, but I will scan this group as well.
- --
-
- Jon Thackray jont@uk.co.harlqn 44 223 872522 (voice)
- Harlequin Ltd. jgt1@uk.ac.cam.phx 44 223 872519 (fax)
- Barrington Hall
- Barrington
- Cambridge CB2 5RG
- England
-