Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Test Driven Development, for software and for pancakes

by Anonymous Monk
on Jul 25, 2017 at 18:21 UTC ( [id://1196032]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Test Driven Development, for software and for pancakes
in thread Test Driven Development, for software and for pancakes

Hi there. Unwittingly, you have provided perhaps the perfect counter-example to TDD.

Similar to how one cannot prove non-existence, one also cannot anticipate the unforeseeable. In other words, tests may guard against regressions, but they cannot save you from bugs.

In C, bitwise shifts by less than operand width, are allowed. Given 32-bit unsigned int, a shift by 32 invokes undefined behavior. And in particular, on x86 this shift is equivalent to a NOP.

print bit_mask(32, 0);

But don't feel too bad about it; similar shift-mask bugs have occurred in security-critical contexts before...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1196032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-18 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found