Re: [GHC] #1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking

2007-02-17 Thread GHC
#1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking
-+--
 Reporter:  bos  |  Owner: 
 Type:  bug  | Status:  closed 
 Priority:  normal   |  Milestone: 
Component:  hslibs/data  |Version:  6.6
 Severity:  normal   | Resolution:  invalid
 Keywords:   | Difficulty:  Easy (1 hr)
 Testcase:   |   Architecture:  Multiple   
   Os:  Multiple |  
-+--
Changes (by igloo):

  * resolution:  = invalid
  * status:  new = closed

Old description:

 I think it should be failing with Nothing if given a string of digits
 that's too long.
 {{{~ $ ghci
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.6, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base ... linking ... done.
 Prelude :m +Data.ByteString.Lazy.Char8
 Prelude Data.ByteString.Lazy.Char8 readInt (pack )
 Just (7766279631452241919,LPS [])}}}

New description:

 I think it should be failing with Nothing if given a string of digits
 that's too long.
 {{{
 ~ $ ghci
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.6, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base ... linking ... done.
 Prelude :m +Data.ByteString.Lazy.Char8
 Prelude Data.ByteString.Lazy.Char8 readInt (pack )
 Just (7766279631452241919,LPS [])
 }}}

Comment:

 Haskell doesn't define overflow behaviour, so I think this is no bugs.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1132
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking

2007-02-04 Thread GHC
#1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking
+---
Reporter:  bos  |   Owner:  
Type:  bug  |  Status:  new 
Priority:  normal   |   Milestone:  
   Component:  hslibs/data  | Version:  6.6 
Severity:  normal   |Keywords:  
  Difficulty:  Easy (1 hr)  |Testcase:  
Architecture:  Multiple |  Os:  Multiple
+---
I think it should be failing with Nothing if given a string of digits
 that's too long.
 {{{~ $ ghci
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.6, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base ... linking ... done.
 Prelude :m +Data.ByteString.Lazy.Char8
 Prelude Data.ByteString.Lazy.Char8 readInt (pack )
 Just (7766279631452241919,LPS [])}}}

-- 
Ticket URL: http://cvs.haskell.org/trac/ghc/ticket/1132
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking

2007-02-04 Thread GHC
#1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking
-+--
 Reporter:  bos  |  Owner: 
 Type:  bug  | Status:  new
 Priority:  normal   |  Milestone: 
Component:  hslibs/data  |Version:  6.6
 Severity:  normal   | Resolution: 
 Keywords:   | Difficulty:  Easy (1 hr)
 Testcase:   |   Architecture:  Multiple   
   Os:  Multiple |  
-+--
Comment (by bos):

 Hmm, guess I can't use WikiFormatting after all. Sorry for the mess!

-- 
Ticket URL: http://cvs.haskell.org/trac/ghc/ticket/1132
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking

2007-02-04 Thread GHC
#1132: Data.ByteString.Lazy.Char8's readInt does no bounds checking
-+--
 Reporter:  bos  |  Owner: 
 Type:  bug  | Status:  new
 Priority:  normal   |  Milestone: 
Component:  hslibs/data  |Version:  6.6
 Severity:  normal   | Resolution: 
 Keywords:   | Difficulty:  Easy (1 hr)
 Testcase:   |   Architecture:  Multiple   
   Os:  Multiple |  
-+--
Comment (by bos):

 Don points out that this behaviour is consistent with that of read, so
 depending on your perspective, we have either one bug (in two places), two
 bugs, or no bugs :-)

-- 
Ticket URL: http://cvs.haskell.org/trac/ghc/ticket/1132
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs