unsafeShift operations for Data.Bits

roconnor at theorem.ca roconnor at theorem.ca
Fri Nov 10 02:44:59 EST 2006

On Fri, 10 Nov 2006, Donald Bruce Stewart wrote:

>> uncheckedFoo - under certain conditions that arn't checked for, this
>> routine may produce well defined, but unspecified behavior. (as in, the
>> behavior might depend on something compiler or architecture specific)
>    uncheckedShift
>    uncheckedRead/Write

Doesn't a uncheckedRead/Write potentially crash my machine and/or 
overwrite arbitrary points of memory?  It seems like at least 
unwiseunsafeWrite could break the dynamic semantics by breaking the static 
semantics in a random and machine dependent way.  And still a 
uncheckedRead can segfault my machine.  I submit that any instruction that 
can segfault my machine is unsafe.

Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

More information about the Libraries mailing list