To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (an extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
USD
EUR
RUB
* By clicking this button you agree to our Privacy Policy statement

Free PVS-Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
Let's Play a Game

Let's Play a Game

Sep 18 2014
Author:

The authors of the PVS-Studio analyzer invite you to test your attentiveness.

0280_Play_a_Game/image1.png

Code analyzers never get tired and can find errors a human's eye cannot easily notice. We have picked a few code fragments with errors revealed by PVS-Studio, all the fragments taken from well-known open-source projects.

We invite you to take part in a competition against code analyzers to test your agility by trying to find the errors by yourself. You will be offered 15 randomly selected tasks. Every correct answer earns you one score if you give it within 60 seconds. The code fragments are short and 60 seconds is a fair limit.

Let's examine a couple of examples with errors for you to understand how to give the answer.

Example one. You see the following code:

0280_Play_a_Game/image2.png

The error here is marked red, but there won't be any marking for you when solving tasks, of course.

The programmer has made a typo and written index 3 instead of 2. When moving the cursor above the code, various words and numbers will be highlighted. You should point the cursor at number 3 and click the left mouse button.

That will be the right answer.

Example two. It's not always possible to give one definite answer:

0280_Play_a_Game/image3.png

The buffer size is to be compared to number 48. The programmer accidentally wrote an excess sizeof() operator, which will result in comparing the buffer size to the size of the int type.

In my opinion, it is the "sizeof" operator which is a mistake here and this is the word you should point the mouse at. However, without knowing the complete program text, one may go another way in one's thinking: the 'sizeof' operator was to calculate the size of some buffer but was mistakenly fed a macro. The error then is in "SSL3_MASTER_SECRET_LENGTH".

For cases like this, both answers (whether "sizeof" or "SSL3_MASTER_SECRET_LENGTH") will count as correct.

Good luck. Start the game.

P.S. We understand that the tasks are not perfect; it's not always clear where exactly you should

"hit" with the mouse, and the system can be cheated. Just remember that this site section was created purely for fun's sake, not for detailed and reliable testing of someone's abilities.

Comments (0)

Next comments
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept