simulator spotted a small problem with initializing stdout for the CommandLineHandler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

simulator spotted a small problem with initializing stdout for the CommandLineHandler

Eliot Miranda-2
Hi Camillo,

    Clément and I are simulating Pharo for Sista and I've spotted the following small problem with the BasicCommandLineHandler's use of stdout.  It looks like a bug in MultiByteFileStream>wantsLineEndConversion:.  BasicCommandLineHandler>>initializeStdout sets stdout's line end conventuion, but in doing so MultiByteFileStream>wantsLineEndConversion: sends MultiByteFileStream>detectLineEndConvention, which is wrong, because stdout is write-only.  I needed to change the simulator to fail as the VM does, but perhaps a better fix is not to try and read from write-only streams.  Anyway, thought I'd point it out.  No biggie.

  16r101B18 M MultiByteFileStream>detectLineEndConvention 16r1F3A7A0: a(n) MultiByteFileStream
  16r101B38 I MultiByteFileStream>wantsLineEndConversion: 16r1F3A7A0: a(n) MultiByteFileStream
  16r101B60 I BasicCommandLineHandler(CommandLineHandler)>initializeStdout 16r1F3A654: a(n) BasicCommandLineHandler
  16r101B84 I BasicCommandLineHandler(CommandLineHandler)>initialize 16r1F3A654: a(n) BasicCommandLineHandler
  16r101BA4 I BasicCommandLineHandler>initialize 16r1F3A654: a(n) BasicCommandLineHandler
  16r101BBC M BasicCommandLineHandler class(Behavior)>new 16r5B04CC: a(n) BasicCommandLineHandler class
  16r101BD4 M [] in BasicCommandLineHandler class>startUp: 16r5B04CC: a(n) BasicCommandLineHandler class

--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: simulator spotted a small problem with initializing stdout for the CommandLineHandler

pharo4Stef@free.fr
Tx

https://pharo.fogbugz.com/default.asp?13165


On 01 Apr 2014, at 19:48, Eliot Miranda <[hidden email]> wrote:

> Hi Camillo,
>
>     Clément and I are simulating Pharo for Sista and I've spotted the following small problem with the BasicCommandLineHandler's use of stdout.  It looks like a bug in MultiByteFileStream>wantsLineEndConversion:.  BasicCommandLineHandler>>initializeStdout sets stdout's line end conventuion, but in doing so MultiByteFileStream>wantsLineEndConversion: sends MultiByteFileStream>detectLineEndConvention, which is wrong, because stdout is write-only.  I needed to change the simulator to fail as the VM does, but perhaps a better fix is not to try and read from write-only streams.  Anyway, thought I'd point it out.  No biggie.
>
>   16r101B18 M MultiByteFileStream>detectLineEndConvention 16r1F3A7A0: a(n) MultiByteFileStream
>   16r101B38 I MultiByteFileStream>wantsLineEndConversion: 16r1F3A7A0: a(n) MultiByteFileStream
>   16r101B60 I BasicCommandLineHandler(CommandLineHandler)>initializeStdout 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101B84 I BasicCommandLineHandler(CommandLineHandler)>initialize 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101BA4 I BasicCommandLineHandler>initialize 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101BBC M BasicCommandLineHandler class(Behavior)>new 16r5B04CC: a(n) BasicCommandLineHandler class
>   16r101BD4 M [] in BasicCommandLineHandler class>startUp: 16r5B04CC: a(n) BasicCommandLineHandler class
>
> --
> best,
> Eliot