Introducing Malicious Code Reviews
paulbiggar.blogspot.com
Introducing Malicious Code Reviews
1–10 of 15 posts
Re: Introducing Malicious Code Reviews
#2Re: Introducing Malicious Code Reviews
#3The best you can come up with is how tangled the code in a hand-written lexer looks? I may have skimmed a bit towards the end, but, did you actually find a bug?
As to the presence of a bug, impossible to tell. Which is the point.
Re: Introducing Malicious Code Reviews
#4Re: Introducing Malicious Code Reviews
#5The best you can come up with is how tangled the code in a hand-written lexer looks? I may have skimmed a bit towards the end, but, did you actually find a bug?
Since its practically the entire contents of the file, its hard to do better. As to the presence of a bug, impossible to tell. Which is the point.
Re: Introducing Malicious Code Reviews
#6Is the PHP community open to refactorings of the code? Do they have the tests in place to make that possible?
Re: Introducing Malicious Code Reviews
#7The best you can come up with is how tangled the code in a hand-written lexer looks? I may have skimmed a bit towards the end, but, did you actually find a bug?
Re: Introducing Malicious Code Reviews
#8Is the PHP community open to refactorings of the code? Do they have the tests in place to make that possible?
Why would they want to refactor their lexer? They're hard to get right in the first place.
I understand that it may be dumb to refactor the lexer, but it gets less dumb if it's supported by hundreds of tests, and far more dumb if it's based on testing over time.
Re: Introducing Malicious Code Reviews
#9The best you can come up with is how tangled the code in a hand-written lexer looks? I may have skimmed a bit towards the end, but, did you actually find a bug?
if ( .. )
{
for ( .. )
{
label:
...
}
}
else
{
if ( .. )
{
..
}
else
goto label;
..
}
The actual code is even worse than this as there's a second goto that jumps from the top for into one of else blocks at the bottom from where the control can go back to for via another goto ... I sort of can see how this code came about, but there is absolutely no excuse for checking in something this f*cked up.If they wanted to show off, they should've just used the coroutines :-)