4 ms·
Sounds more like a off by 1 bug that was hidden by regexs if I'm reading correctly
by studmuffin650 2y ago
Sounds more like a off by 1 bug that was hidden by regexs if I'm reading correctly
- darylteo 2y agoVery easily hidden. Something obtuse like (.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+)|(.+) or even this (.{4})(.{7})(.{3})(.{6})(.{9})(.{4})(.{7})(.{3})(.{6})(.{9})(.{4})(.{7})(.{3})(.{6})(.{9})(.{4})(.{7})(.{3})(.{6})(.{9})(.{1}) would simply fail to match. And I wouldn't necessarily blame the developer in either scenario - they received a card that says "hey the channel file will now have an extra field in it's schema"... noone said "btw it's optional". Calling it a "first year programming mistake" like I'm reading in some media is somewhat incendiary. I see unmarshalling errors happen all the time. The forest that we must not miss is the kernel-level driver simply dies with no error recovery and bricks the system.
- studmuffin650 2y agoI think that’s just the nature of kernel programming. Once you’re running in kernel space, there are essentially no safety guards, which is why kernel programming is so difficult. Any faults that occur in user space causing a seg fault + core dump do not exist in kernel space. Especially since kernel code generally has to be written in C, it can be quite difficult even for the best engineers to get everything right.
- cptskippy 2y agoYeah, my read was that they changed an interface to include an optional parameter but never actually tested the underlying code by providing said optional parameter. The bug in clients (sensors) wasn't due to regex, the regex was in their integration unit testing which also had a bug and was never supplying the 21st parameter to the client code.