Issue 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

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

Issue 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug Milestone-2.0

New issue 6139 by [hidden email]: Subscript out of bounds in  
WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

There is a bug in the method WindowsStore>>pathFromString: that
assumes that the argument string given has at least a width of 2.


If you have a relative directory that is called "a" (just one character)  
this would lead to a Subscript out of bounds error when sending #second.
Try yourself:

   WindowsStore current pathFromString: 'a'

crashes.


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139


Attached is a proposed fix and test suite. Feel free to check and integrate

IMPORTANT NOTE:
===============
The fix is using an utility method from the fix for isse #6138
Therefore the attached fix requires "ProposedFix.cs" from  
http://code.google.com/p/pharo/issues/detail?id=6138


Attachments:
        FixWindowsStore .cs  1.1 KB


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: MonkeyIsChecking

Comment #2 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139#c2

The Monkey is currently checking this issue. Please don't change it!


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: WorkNeeded

Comment #3 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139#c3

Monkey went bananas:
--------------------
Error while loading "FixWindowsStore+.cs" from Comment #1:
        MessageNotUnderstood: ReadStream>>fileIn
  1: ReadStream(Object)>>doesNotUnderstand: #fileIn
  2: [attachment contents asString readStream fileIn] in [:attachment |  
[attachment contents asString readStream fileIn]
                        on: Error
                        do: [:e | self addError: e forFile: attachment description]] in  
ChangeLoader>>loadChangeSet
  3: BlockClosure>>on:do:
  4: [:attachment | [attachment contents asString readStream fileIn]
                        on: Error
                        do: [:e | self addError: e forFile: attachment description]] in  
ChangeLoader>>loadChangeSet
  5: Array(SequenceableCollection)>>do:
  6: ChangeLoader>>loadChangeSet
  7: [self loadChangeSet] in ChangeLoader>>loadAndTestChangeSet
  8: [loadStopwatch reset activate.
                aBlock value.
                loadStopwatch suspend.
                testResult := self runTests.
                self removeFalseErrors] in ChangeLoader>>testChangeImpact:
  9: BlockClosure>>on:do:
10: ChangeLoader>>testChangeImpact:
        ...
----------------------------------------------------------
Loaded Source: "FixWindowsStore+.cs" from Comment #1
Tested using Pharo-2.0-20172-a on CoInterpreter  
VMMaker-oscog-EstebanLorenzano.160 uuid:  
bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 22 2012,  
StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.160 uuid:  
bec8cdf0-4e06-4975-8c02-e882fadf4df3 Jun 22 2012,  
https://git.gitorious.org/cogvm/blessed.git Commit:  
744bfe905c78a1a5d408680a8780367ea77e0549 Date: Fri Jun 1 15:17:41 2012  
+0200 By: Esteban Lorenzano <[hidden email]>


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo

Comment #4 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

removed the space from the attached .st file

Attachments:
        FixWindowsStore.cs  1.1 KB


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: FixReviewNeeded

Comment #5 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

(No comment was entered for this change.)


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo

Comment #6 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

the monkey can right now nor read .cs files,,, there is already a report  
for that.


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: MonkeyIsChecking

Comment #7 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139#c7

The Monkey is currently checking this issue. Please don't change it!


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: WorkNeeded

Comment #8 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139#c8

Monkey went bananas:
--------------------
Error while loading "FixWindowsStore.cs" from Comment #4:
        MessageNotUnderstood: ReadStream>>fileIn
  1: ReadStream(Object)>>doesNotUnderstand: #fileIn
  2: [attachment contents asString readStream fileIn] in [:attachment |  
[attachment contents asString readStream fileIn]
                        on: Error
                        do: [:e | self addError: e forFile: attachment description]] in  
UlysseTheMonkey>>loadChangeSet
  3: BlockClosure>>on:do:
  4: [:attachment | [attachment contents asString readStream fileIn]
                        on: Error
                        do: [:e | self addError: e forFile: attachment description]] in  
UlysseTheMonkey>>loadChangeSet
  5: Array(SequenceableCollection)>>do:
  6: UlysseTheMonkey>>loadChangeSet
  7: [self loadChangeSet] in UlysseTheMonkey>>loadAndTestChangeSet
  8: [loadStopwatch reset activate.
                aBlock value.
                loadStopwatch suspend.
                testResult := self runTests.
                self removeFalseErrors] in UlysseTheMonkey>>testChangeImpact:
  9: BlockClosure>>on:do:
10: UlysseTheMonkey>>testChangeImpact:
        ...
----------------------------------------------------------
Loaded Source: "FixWindowsStore.cs" from Comment #4
Tested using Pharo-2.0-20182-a on CoInterpreter  
VMMaker-oscog-EstebanLorenzano.161 uuid:  
8e0c22c3-b48d-4d8d-a7f9-8a75dc246f28 Jul  3 2012,  
StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.161 uuid:  
8e0c22c3-b48d-4d8d-a7f9-8a75dc246f28 Jul  3 2012,  
https://git.gitorious.org/cogvm/blessed.git Commit:  
8028952c1242f72b6d078b8161f310e3bf0cd365 Date: Tue Jul 3 16:26:14 2012  
+0200 By: Esteban Lorenzano <[hidden email]>


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: FixToInclude

Comment #9 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

Since the monkey does not love changeset and I now remember how easy it is  
to provide a slice the fix is added in:

Name:  
SLICE-Issue-6139-Subscript-out-of-bounds-in-WindowsStoregtgtpathFromString-TorstenBergmann.1
Author: TorstenBergmann
Time: 5 July 2012, 9:06:56.757 am
UUID: def1cfa7-40ac-c64d-b545-6e707b90fe75
Ancestors:
Dependencies: FileSystem-Disk-TorstenBergmann.28,  
FileSystem-Tests-Disk-TorstenBergmann.7

fix for http://code.google.com/p/pharo/issues/detail?id=6139


_______________________________________________
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 6139 in pharo: Subscript out of bounds in WindowsStore>>pathFromString:

pharo
Updates:
        Status: Integrated

Comment #10 on issue 6139 by [hidden email]: Subscript out of bounds  
in WindowsStore>>pathFromString:
http://code.google.com/p/pharo/issues/detail?id=6139

in 2.0 185


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