Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: ShadowAce

someone should have tested it with the __WCLONE option at least once to see if it returned -EINVAL

was it caught by unit testing? if not, it should have been

could have been sloppy code. that wouldn’t surprise me. better hacks involve pts to functions buried in hex tables of object code


14 posted on 10/10/2013 1:39:38 PM PDT by sten (fighting tyranny never goes out of style)
[ Post Reply | Private Reply | To 1 | View Replies ]


To: sten
As the article states, it was caught because it was submitted incorrectly to CVS without any corresponding safeguards.

No need to unit test two lines when you know what those two lines are and can read the code.

15 posted on 10/10/2013 1:50:05 PM PDT by ShadowAce (Linux -- The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 14 | View Replies ]

To: sten

“could have been sloppy code. that wouldn’t surprise me. better hacks involve pts to functions buried in hex tables of object code”

Yeah, but I think that’s exactly what makes this a good hack, in a way. It COULD just be sloppy code. And sloppy code can slip past a lot of eyes, sometimes.


18 posted on 10/10/2013 2:29:26 PM PDT by Boogieman
[ Post Reply | Private Reply | To 14 | View Replies ]

To: sten

someone should have tested it with the __WCLONE option at least once to see if it returned -EINVAL


if ((options == (__WCLONE|__WALL))


Actually it wouldn’t - the code is written to only return that value
if BOTH flags were set AND ONLY both flags were set. The bitwise
OR and the equality test results in an AND semantic.

Whether this itself makes sense (i.e. to only take the conditional if both
flags are set) or it this would tend to be something with some more
devious intent - I don’t have enough knowledge to say.


20 posted on 10/10/2013 3:20:43 PM PDT by 2 Kool 2 Be 4-Gotten
[ Post Reply | Private Reply | To 14 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson