Author: Stan Eisenstat
Subject: Re: [Cs323] 0 code on Hwk4/decode followup
Date: Saturday, 07 Nov 2020, 12:44:30
> Message Posted By: Unknown > > The spec says to write an error to stderr if there would be a valgrind > error for any given input to decode. > > in stage=1, if you send: > 12 > 0 > 0, > > /Hwk4/decode errors with the third code sent (0). I assume that 0 is the > EMPTY string in the table. Considering that it is in the table, why would > the second 0 have caused a valgrind error if the solution code had not > err'ed before? Your assumption is incorrect. And as I posted earlier this morning, Date: 07 Nov 2020 07:38:40 -0500 (Sat) Subject: Re: [Cs323] 0 code on Hwk4/decode ... I do not get a valgrind error: $ cat z 12 0 0 $ STAGE=1 valgrind -q /c/cs323/Hwk4/decode < z decode: invalid code 0 Are you getting a different result? --Stan-PREV INDEX NEXT