[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060401075843.GA7003@sivokote.iziade.m$>
Date: Sat Apr 1 08:58:50 2006
From: guninski at guninski.com (Georgi Guninski)
Subject: Linus mass killing integer overflows
unofficial C++ support for the linux kernel has been for quite a while:
[1] http://netlab.ru.is/exception/LinuxCXX.shtml
--quote
C++ in the Linux Kernel
We have implemented a complete kernel level run-time support for C++ in
the Linux kernel. In particular our run-time support enables the full use
of C++ exceptions in the Linux kernel, but notably also includes support
for global constructors and destructors, and dynamic type checking.
--quote
the news is, the benevolant dictator has said "let there be C++", and there
is more secure, full featured, reliable and faster linux kernel written[2]
mainly in C++. the official release is scheduled for 2.8 or when redhat(tm)
becomes ready for the desktop[3], whichever comes first.
key improvements include:
a) integer overflows *were* PITA for the kernel janitors. once the classes
SafeInt and SafeLong were implemented with suitable operators, the new
kernel is 100% "int/long too big" free. the refactoring tool made this part
easy.
b) some clever abuse of exceptions dramatically reduces the amount of OOPS:
cases like '*(SafeInt*)0=foo->bar()' are now gracefully catch()ed, killing
the OOPS.
c) kernel structures *were* just lame emulation of C++ objects. now they are
native C++ objects.
d) exceptions result in cleaner, easier to read code and almost stop the nasty
abuse of "goto"
currently there are discussions for implementing COM in the
kernel and/or scripting the kernel from userland, but Linus hasn't made up
his mind yet.
the first public prerelease will be available from
ftp://ftp.kernel.org/pub/linux/kernel soon.
--
[1] http://netlab.ru.is/exception/LinuxCXX.shtml
[2] "written" is not quite correct. the existing C codebase was refactored
to C++ using a sophisticated refactoring tool based on sparse
[3] http://news.zdnet.com/2100-3513_22-5101690.html
Powered by blists - more mailing lists