Path: utzoo!attcan!uunet!mcsun!hp4nl!fwi.uva.nl!mel!croes From: croes@fwi.uva.nl (Felix A. Croes) Newsgroups: comp.os.minix Subject: Re: Gross bug in fs/open.c Message-ID: <1116@carol.fwi.uva.nl> Date: 30 Jun 90 21:16:11 GMT References: <7028@star.cs.vu.nl> <1990Jun28.153540.2584@dsuvax.uucp> Sender: news@fwi.uva.nl Reply-To: croes@fwi.uva.nl (Felix A. Croes) Organization: The Courts of Chaos Lines: 19 In article <1990Jun28.153540.2584@dsuvax.uucp> ghelmer@dsuvax.uucp (Guy Helmer) writes: >This looks like a fairly important fix. From a casual perusal of the >code, how did a file's length ever get set correctly? Function >new_node in open.c would have been putting junk in the i_size field >of every inode for every new file. It is not really a miracle, but a coincidence. First, the last argument is put on the stack, intended as an argument for put_inode. Then, the arguments for new_node are evaluated and pushed. So new_node finds the arguments on the stack exactly in the way they should be - only, according to the way it is invoced, it should not know about or make use of the last argument. Put_inode will expect only one argument, and ignore any others. If my assumption is correct, this fix should not result in any change in the minix.img output. -- Felix Croes (croes@fwi.uva.nl)