Google programmers lose a “&” less, almost bricking the global Chrome notebook

Go online without testing?

The code is only missing one character, the consequences are so terrible.

Last week, some users of Chrome OS laptops found that once they restarted the laptop, they would fall into an endless loop of not being able to log in.

Google programmers lose a "&" less, almost bricking the global Chrome notebook

The power-on password entered is correct, but it always prompts “Unable to verify your password” and cannot enter the system. A more serious situation is that the notebook will restart repeatedly.

Why does a good notebook suddenly “brick”?

It turned out to be the fault of a quiet and automatic update of Chrome OS.

Since ChromeOS is open source, a Reddit netizen carefully checked the code of the system update and found that the low-level errors in it were dumbfounding.

Google programmers lose a "&" less, almost bricking the global Chrome notebook

One less “&” to blame

After carefully comparing the two codes, this netizen found that behind this “shocking bug”, it turned out that Google programmers missed one character “&”.

The original correct code should be:

  • if (keydata.hasvalue() && !key_data->label().empty())

But the programmer wrote this if statement as

  • if (keydata.hasvalue() & !key_data->label().empty())

Although the two operators “&&” and “&” seem to be just a little bit different, their functions are really very different.

The former is the AND of two variables, while the latter is the bitwise AND of these two values.

As a result, every bit of the variables on both sides of the conditional statement will be ANDed. Even if has_value() is true, the returned result is not necessarily true.

And this string of code is the part of Chrome OS that saves the user’s encryption key. Because of this error, the system cannot verify and compare the stored key with the input password, and an embarrassing scene occurs.

After receiving user feedback, Google quickly released the 91.0.4472.167 update to solve the problem.

If your Chrome notebook just can’t access the current account, you can try to install the latest update first without losing files.

If your laptop restarts indefinitely, you can only restore the factory settings and then receive the update, and all data will be lost.

Released without testing, it’s really outrageous

Such a low-level mistake made by a dignified Internet manufacturer has made many Chromebook users angry:

Has Google’s testing team been on vacation for these two months?

Google programmers lose a "&" less, almost bricking the global Chrome notebook

Does Google have no code testing? Why release the code to the production environment without testing.

Google programmers lose a "&" less, almost bricking the global Chrome notebook

Chrome OS has always made “small mistakes” in the past, so some users have learned astutely:

I have learned to wait for the update to be released for a while before upgrading.

Google programmers lose a "&" less, almost bricking the global Chrome notebook

I really didn’t expect that one less character in the code could be so destructive. Fortunately, the Chrome OS system update is carried out in batches, and the spread is not too wide.

Seeing this Google programmer bug, do you remember any low-level mistakes you have made? (For example, write the equal sign “==” as the assignment sign “=”)

Reference link:

[1]https://9to5google.com/2021/07/21/psa-chrome-os-update-locking-out-accounts/

[2]https://arstechnica.com/gadgets/2021/07/google-pushed-a-one-character-typo-to-production-bricking-chrome-os-devices/?comments=1

[3]https://www.reddit.com/r/chromeos/comments/onlcus/update_it_seems_google_has_pulled_the_165_stable/h5vev76/

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/google-programmers-lose-a-less-almost-bricking-the-global-chrome-notebook/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-07-26 04:38
Next 2021-07-26 04:39

Related articles