Tuesday, November 23, 2010

GCC has gone mad

In my July post I praised the GCC ability to detect uninitialized variables, but now it seems I have to take this praise back. We discovered several cases of false negatives (i.e. missing warnings) about uninitialized variables in GCC 4.5.1 that look like regressions from the behavior of GCC 4.4.4 or perhaps were not detected even by the older version.

Make your own picture of the situation. The following is an example of one use of an uninitialized variable that goes undetected by the new GCC at the -O3 optimization level:

312 static int packet_reply(const packet_t packet)
313 {
314 ipc_callid_t callid;
315 size_t size;
317 if (!packet_is_valid(packet))
318 return EINVAL;
320 if (size != packet->length)
321 return ENOMEM;

And yes, packet is valid and line 320 is being reached. This and other examples can be found here:
On the web I found the GCC meta-bug for these and related issues and it looks like this is currently a big problem in GCC. Perhaps I would get more warnings if I first built with -O. That's possible, maybe. But I don't want to run the compilation twice. I don't like arguments that say if we detected uninitialized variables more reliably, the compilation would get slower. I can wait a little longer if I get reliable warnings.

Wednesday, November 17, 2010

HelenOS gains momentum

I have just gone through the inventory of all active HelenOS student projects and was impressed by the actual finding. Not only that there have never been so many students working on HelenOS at the same time, but the current number is quite high so that HelenOS as an academic project compares favorably with similar, but heavily funded, projects like MINIX 3.

People Projects
Semestral assignments 1
Software projects 9
Bachelor theses 1
Master theses 8 8
Doctoral theses 1 1
Total 20 13

The total number of students is actually 19 because one student works both on a team Software project and his master thesis and the above table counted him twice. Most projects figuring in the table have started only recently, which means that we are not accumulating unfinished projects. Quite the opposite: we observe an increasing trend in the amount of defended master theses:

Year Theses
2006 1
2007 1
2008 2
2009 2
2010 3

I was wondering what is the reason for such a rise of interest in HelenOS among students and while there is probably no single correct answer, here are my suspects:
  • The project is in a stage in which it needs some larger frameworks to be developed; larger frameworks can be good fit for team projects of four or five students, such as the Software project subject at Charles University.
  • We had some interesting and high-quality project ideas up in our sleeves originally intended for the Google Summer of Code 2010, but since we were not accepted as a mentoring organization, these projects are now being picked up by regular university students, including students from foreign universities.
  • HelenOS is now a first-class project at D3S. The department's web site has recently undergone a major facelift and as a result of that, it mentions HelenOS in various places that are likely to be noticed by students looking for an interesting topic.
  • The whole HelenOS movement itself is like a black hole. With every successfully completed and integrated student project, it gets noticeably better and becomes more attractive to other students who in turn tend to start new projects.
  • Martin has likely changed his recruiting practices so that they appear more efficient now. Even though it remains unclear what change he made, it appears to work in synergy with the above.
The message is clear: if you are a student and your project or thesis topic is not related to HelenOS, than I am afraid you are not currently in :-)

The list of student projects and theses in progress is available on our wiki. If you actually happen to be looking for a topic, the same wiki contains various pointers to yet unassigned project ideas (here, here and here). Or simply just drop us a line!