Mercury Bugs - mercury
View Issue Details
0000151mercuryBugpublic2010-05-30 16:252022-10-11 16:35
Reporterpbone 
Assigned Tojuliensf 
PrioritynormalSeveritytrivialReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000151: Incorrect documentation for string.unsafe_set_char
DescriptionJames Cussens found that the documentation for this standard library predicate and function doesn't match the implementation. The documentation says that it is a constant time operation but it involves a strcpy.

The unsafe part of the name says that there is no bounds check and that a strlen call isn't performed.
TagsNo tags attached.
Attached Files

Notes
(0000265)
juliensf   
2010-05-30 16:28   
The documentation refers to the commented out mode of unsafe_set_char, which
is constant time. The problem is that the mode that is enabled isn't.
(0001204)
juliensf   
2022-10-11 16:35   
This was fixed in commit f71b5f20.

Issue History
2010-05-30 16:25pboneNew Issue
2010-05-30 16:28juliensfNote Added: 0000265
2010-07-07 17:53pboneFile Added: bug151a.m
2010-07-07 17:54pboneFile Deleted: bug151a.m
2022-10-11 16:35juliensfAssigned To => juliensf
2022-10-11 16:35juliensfStatusnew => resolved
2022-10-11 16:35juliensfResolutionopen => fixed
2022-10-11 16:35juliensfNote Added: 0001204