Hacker News new | ask | show | jobs
by nixpulvis 512 days ago
Seems like something to be integration tested in the future. Honestly surprised this slipped through.
2 comments

I saw that types are different, but I was thinking "must be some weird C thing that I don't know about"
I am not surprised. First, it's a subtle bug. Second, in C/C++. a lot of times you get unlucky when reading uninitialized memory. Basically, the bug does not occur when you test the code on your machine or when you run the automated tests.

Another problem is writing good automated tests is hard and often skipped. Lots of software engineering teams talk about the wonders of automated tests. Unfortunately, many automated tests are not very good and either do not ensure the major functionality works or just do not test some of the code. There are also limits to how much time a software engineer has to test. No one can test everything.

Basically, I am not surprised developers make mistakes and I am not surprised the tests either did not catch this mistake or even did not exist. Software is very hard and software engineers are far from perfect.

Right, but this was caught basically instantly by Asan.
He had time to test it. /s