一个空格引发的惨剧
<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px;"> 你是否相信如果你的程序里没有检查一个变量会导致怎么系统瘫痪?无论你相不相信,这是我一个亲身经历过的案例,你可以在本站的程序员那些悲催的事儿中找到很多这样的事。这样的事昨天在发生,今天同样在发生。Unix40多年了,在这40年里,程序员发生过各种各样的的惨剧,但是大多数的事情一而再再而三的重演。今天的你,可能在开发者各种各样NB的系统,你会相信你的一个空格也能导致系统瘫痪吗?也许你可能很难相信这个事。不过,再下面这个事将告诉你这个血淋淋的事实 —— 一个空格产生的bug可以让你的系统瘫痪。
bumblebee是一个开源项目,这个名字也就是变形金刚里的大黄蜂,这个项目是这样介绍自己的——
bumblebee is Optimus support for Linux, with real offloading, and not switchable graphics.. More important.. it works on Optimus Laptops without a graphical multiplexer..
Optimus 是NVIDIA的“优驰”技术,其可以将您的笔记本电脑PC提升到绝佳状态,提供出色的图形性能,并在需要时延长电池续航时间。这个项目是把这个技术移到Linux上来。
这个项目本来不出名,不过,程序在其安装脚本install.sh里的一个bug让这个项目一下子成了全世界最瞩目的项目,这个bug的fix如下:
<div style="padding: 0px; margin: 0px;"><div class="syntaxhighlighterdiff" style="margin-top: 1em !important; margin-right: 0px !important; margin-bottom: 1em !important; margin-left: 0px !important; width: 639px; background-color: white !important; padding: 0px;"><div class="line number1 index0 alt2" style="padding-top: 0px !important; padding-right: 0.5em !important; padding-bottom: 0px !important; padding-left: 1em !important; border-top-left-radius: 0px 0px !important; border-top-right-radius: 0px 0px !important; border-bottom-right-radius: 0px 0px !important; border-bottom-left-radius: 0px 0px !important; background-image: none !important; background-color: white !important; border-top-width: 0px !important; border-right-width: 3px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-color: initial !important; float: none !important; height: auto !important; line-height: 1.1em !important; text-align: right !important; vertical-align: baseline !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: normal !important; font-style: normal !important; direction: ltr !important; white-space: pre !important; border-right-style: solid !important; border-right-color: #6ce26c !important; margin: 0px !important;">1
页:
[1]