Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

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

Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo
Status: Accepted
Owner: [hidden email]

New issue 5004 by [hidden email]: Decompiler miss-initialize the  
Encoder literalStream with a ReadStream when a WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

The 'literalStream' instance variable of an Encoder is used as a  
WriteStream.
However, the Decompiler initialize this ivar with a ReadStream which is  
wrong, but mostly worked because a ReadStream canUnderstand: #contents  
(Yeah, very nice and clever these Squeak Streams)

Since I changed Encoder>>allLiterals to add the special selectors sends,  
this ugly hackish shit can't work anymore because we really want to  
#nextPut: into this stream and not just query its contents.

Side note: a special selector is a selector directly encoded in some  
special send byte codes rather than refered to through the literals.

I don't know how to exhibit the problem (that is I can't write a test case)  
but Martin McClure reported the problem in Pharo mailing list (17 nov.  
2011, [Pharo-project] Decompiler writing to a ReadStream)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo
Updates:
        Status: FixReviewNeeded
        Labels: Type-Bug Milestone-1.4

Comment #1 on issue 5004 by [hidden email]: Decompiler  
miss-initialize the Encoder literalStream with a ReadStream when a  
WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

Name:  
SLICE-Issue-5004-Decompiler-miss-initialize-the-Encoder-literalStream-with-a-ReadStream-when-a-WriteStream-is-expected-nice.1

Dependencies: Compiler-nice.305


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo

Comment #2 on issue 5004 by [hidden email]: Decompiler  
miss-initialize the Encoder literalStream with a ReadStream when a  
WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

I like to see others saying some true statements about some parts of the  
system.
BTW this is why I really want to get OPAL fully working so that we can  
start to improve it also.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo
Updates:
        Status: closed

Comment #3 on issue 5004 by [hidden email]: Decompiler  
miss-initialize the Encoder literalStream with a ReadStream when a  
WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

in 14233


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo

Comment #4 on issue 5004 by [hidden email]: Decompiler  
miss-initialize the Encoder literalStream with a ReadStream when a  
WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

It's possible that a ReadStream was used on purpose to ensure that no one  
attempt to write into it... Or just by accident, who knows...

One advice: beware, OPAL + Squeak Stream is still weak ;)

My favourite is RWBinaryOrTextStream. Having a 'Or' in the name already  
tells a lot...
Not speaking of RW, Read And Write / Read Or Write ?
I can ear "Hey, I'm carrying way too much responsibility, hack me!".

It's a pity, because with a small modification we could have a  
RWBinaryOrTextOrSomethingElseStream and replace the whole Stream hierarchy  
with this omnipotent class ;)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5004 in pharo: Decompiler miss-initialize the Encoder literalStream with a ReadStream when a WriteStream is expected

pharo

Comment #5 on issue 5004 by [hidden email]: Decompiler miss-initialize  
the Encoder literalStream with a ReadStream when a WriteStream is expected
http://code.google.com/p/pharo/issues/detail?id=5004

"I don't know how to exhibit the problem"
I think I triggered it in a debugger, trying to install modified method  
source.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker