Older blog entries for rmathew (starting at number 26)

GCJ and Definite [Un]Assignments
I spent most of my free time this weekend trying to resolve some of the issues with definite [un]assignment in GCJ as specified by the JLS.

I just wanted to be able to see zero new FAILs with Jacks, but that goal proved to be quite elusive - I fix one bug and that uncovers problems elsewhere, I fix some of those bugs and they uncover some more, ad nauseam - I had to give up after a certain point and just came up with something that is the least disruptive.

All this effort on something that I do not even agree completely with! I mean, this part of the JLS must be one of the shadiest - Sun has just converted into a specification whatever they felt they could reasonably implement in their own compiler, never mind if someone else can come up with a more thorough code flow analysis and give out less stoopid warnings. Sheesh!

www.advogato.org server woes
Even the Advogato server has been having problems lately! The result is that I've not been able to post diary entries for around a week now. (Not that I have anything insanely useful or profoundly interesting to say, but still...)

The following is what I intended to post around a week ago:

GCC Gets Tree-SSA
After almost 4 years of development, the tree-ssa project has finally been merged into the GCC mainline!

The Static Single Assignment (SSA) form enables all sorts of funky optimisations to be implemented in GCC, making it possible for it to compete effectively with commercial optimising compilers.

Thanks in large part to Jeff Sturm and Andrew Haley, GCJ starts off as a first class citizen in this new avatar of GCC, that too with no libjava testsuite regressions. In fact, the Jacks testsuite now shows 30 unexpected successes (XPASSes) with GCJ and only 5 new failures (FAILs)!

The GCC bootstrap time seems to have regressed by around 20% percent, but one should not forget that quite a bit of new code has been added, not to mention the increased number of Trees that are created and the now redundant RTL optimisers.

And oh, by the way, say "Hello!" to Tree Browser!

ELF DSOs
"How to Write Shared Libraries" (PDF) is a paper by Ulrich Drepper that should be mandatory reading for every serious UNIX programmer. If nothing else, it lets one throw terms around like GOT and PLTs at newbies! ;-)

12 May 2004 (updated 12 May 2004 at 06:05 UTC) »
gcc.gnu.org/sources.redhat.com overseers list
Finally there is a backup for the overseers list for this very important server for Free software.

tree-ssa into mainstream GCC
And so it begins...

gcc.gnu.org Server Woes
The server that hosts gcc.gnu.org as well as sources.redhat.com had to be moved out of its colo facility at a very short notice. Its IP address was therefore changed and the RAM was also upgraded to 4GB. However the corresponding DNS entry's TTL was one whole day, so the IP address change did not quite propagate as soon as one would have liked it to. So we couldn't access the server for that period. However, worse was yet to follow.

The increased bandwidth and RAM somehow caused a RAID driver bug that results in hard lock-ups to show up much more frequently than ever before, with the result that the server is only intermittently up for useful work. (It responds to "ping", but CVS, SSH, etc. seem to be down.)

As of this writing, the server is down again - I really hope this issue gets resolved as soon as possible.

By the way, what I do not understand is why the "overseers" mailing list that is used to coordinate the activities of the maintainers of this important server for free software seems to be hosted on the server itself!

Package-Private Accesses in GCJ
My patches for PR 15073 and 9685 are finally in.

Gmail
Gmail is a real pleasure to use - thanks to Yumpee Saar, I've had a Gmail account for a while now. It still lacks a couple of things and is not as customisable as one would have liked it to be, but it is still so much better than any other web-based email service I have seen. Like so many great innovations, it has so many neat and simple features that make you think "Why hadn't anyone thought of this before?". Nice.

I have since had four opportunities to invite others and my wife, my sister, Kingshuk and Srikanth were promptly doled out these invitations.

Package-Private Class Access in GCJ
This weekend I thought I would try my luck at nailing down another instance of illegal package-private access that GCJ lets through (PR java/15073). As luck would have it, I was able to come up with a patch that fixes that problem. The great thing about this patch is that it also simplifies my fix to the other package-private access problem, by removing a nagging kludge that was needed for that fix to work properly. (If you must know, not_accessible_p() in "java/parse.y" was being called even for classes and not just members as it was supposed to be - the kludge was needed to account for such rogue TYPE_DECLs.) Cool!

GCJ Front End Hacking
A couple of remarkable things happened while I was working on the above. First, my wife got curious about what I was trying to fix and how I planned to fix it and pretty soon I found myself walking my wife through the parsing bits of the GCJ front end, including the Java grammar!

She and my sister then left for a movie that I was not at all keen to watch, so I spent that time at home hacking on GCJ - that resulted in four and half hours of continuous hacking that was masochistically exhilarating, helped of course by the fact that I was actually able to find a satisfactory solution at the end of it.

Such hacking binges are sadly so rare now, but used to be so frequent during my undergraduate days. ~sigh~ :-(

Anyway, I found out that the GCJ front-end is not such a mess after all - there's a method to the madness, as they say, but it requires a bit of patience and perseverance to understand. Of course, to use another cliché, I have just seen the tip of the iceberg - who knows what horrors lurk as I try to delve deeper into the front end?

Anyone wishing to understand the front end should definitely try out Alexandre Oliva's debugx to step through the code using a debugger like GDB to see how it works. Inside a debugger, GCC's cool debug_tree() function can be used to examine a TREE node. The GNU coding standards make it very easy to search for the implementation of a function in a file (ESC/^foobar in vi, for example). The function java_parse_file() in the file "java/jcf-parse.c" provides the "big picture" for the front end.

Illegal Package-Private Accesses Checking
...in the current GCJ is just plain broken. I have had a simple patch for fixing this for accesses to package-private members for a long time now, but the bug had let in a few instances of wrong code to creep into libgcj that were sometimes trivial, sometimes not so trivial, to fix. Yesterday, Michael Koch committed the fix for the last of these problems and therefore I promptly submitted a revised version of my patch for review.

Unfortunately, this still does not fix illegal access to package-private classes though.

Sadder still is that GCJ still has a bunch of problems related to access control. :-(

GCC 3.4.0 Released
GCC 3.4.0 is out with tonnes of improvements! Notable among these are cool optimiser improvements (profile feedback based optimisation and unit-at-a-time compilation), a rewritten C++ parser that brings g++ much closer to standards conformance, much better GCJ and a Java interpreter that can actually run Eclipse 2.x(!), etc.

CVS Updates Over SSH
The slow CVS updates from the GCC repository that I was facing were mostly due to filesystem corruption on the machine hosting gcc.gnu.org and sources.redhat.com. Now that these problems have been fixed, my CVS updates over SSH are acceptably fast over my dial-up link at home.

TrueType Fonts Under FreeType2
If you are in a country where software patents do not (yet) apply - or if you just do not believe in them - you should always compile FreeType2 with TT_CONFIG_OPTION_BYTECODE_INTERPRETER defined in the file "include/freetype/config/ftoption.h". This improves the display of TrueType fonts. However, "Times New Roman" and "Courier New" still do not render nicely enough under Mozilla for me. :-(
(Yes, I do have the Xft/Gtk2/Pango enabled build of Mozilla.)

NV40 a.k.a. NVIDIA GeForce6
Wow!

Awed by GRUB/Linux
I had heard of the "loop" capabilities of mount and the Linux kernel, but I experienced its full utility only yesterday - very, very cool!

We needed to install SuSE Linux apart from the existing Red Hat installation on our machine at the office, but neither was the floppy drive enabled nor was it possible to get a bootable CD burned from the corresponding ISO image from SuSE due to the existing "IT policies". (Yes, big corporations are like this some times.)

So we first reformatted our swap partition as a regular ext3 filesystem, "loop" mounted the ISO image and copied over all the files into the newly created filesystem. Then we used the cool edit-boot-parameters-before-booting feature of GRUB to temporarily boot using this filesystem and proceeded to the actual installation. No floppy or CD required!

SuSE Linux 9.0 has a lot more eye candy than a default installation of Red Hat Enterprise Linux 9.0 and also has a couple of cool extra features. I look forward to exploring this variant of my favourite OS.

But I still love Slackware and yearn for its simple methods.

CVS over SSH
Sean Middleditch points out that I should ask SSH to compress the transmitted data by using the "-C" flag. The SSH manual says that I can also set the variables "Compression" and "CompressionLevel" to achieve the same effect. Thanks a lot Sean!

Garbage Collection
Tom quotes Stephan T. Lavavej:"Garbage collection is a morally bankrupt idea".

In my opinion, most developers seem to naively think that Garbage Collection is bad and expensive. They assert that nothing can beat malloc( )/free( ) based explicit (or implicit, via destructors invoked on leaving a scope) resource management. In fact, unless it is a good implementation of malloc( )/free( ), how can you even be sure that these functions will return in a "reasonable" amount of time, every time? You can have sudden stalls under heavy conditions even with these, just as with a garbage collector.

Many nice articles and eye-openers on Garbage Collection can be found at Hans Boehm's site. This article is particularly relevant.

Nitpicking
Please do not say or write "Mr Foo Bar" on first mention - just say "Foo Bar" the first time you refer to a person - after that, you can call him "Mr Bar". The Economist's Style Guide spells it out nicely. In fact, the "Mr Foo Bar" form is not proper at all, but is sadly used almost universally by (at least) English speaking Indians - just use the surnames with "Mr/Mrs/Miss" as in "Mr Bar".

This is not to say that I speak/write perfect English (I strive to, but mostly fail), but there are some things that irritate me more than others and this is one of them.

GDB 6.1
GDB 6.1 has finally been released. This is the only version that works properly with the current GCC CVS without crashing out on the DWARF-2 location lists generated by GCC (that can be disabled by using "-fno-var-tracking").

GCC
Baby's first GCC CVS commit.

"cvs update" over SSH is so slow! Why? Is there anything I can do to help matters?

Hear Ye, Hear Ye!
Planet Classpath has started collecting entries from my diary!

GCC
Since there is no way my hopelessly unreliable dial-up link at home is going to let me synchronise with the GCC CVS repository (which is around 234MB of checked out files), I checked it out elsewhere(?), archived it and brought it home - from that point, checking out differential updates became possible even on my otherwise useless link. Now I finally have a CVS checkout of GCC that can be kept as updated as I wish.

What took me so long to implement this was the time taken to figure out a way of using TCP/IP over HTTP behind a proxy server so that CVS could be used, a way of carrying large amounts of data back home and the time taken to move my glutius maximus.

So I applied for, and got, write access to the GCC CVS this week, albeit not without problems (why do I always run into such things?).

Bootstrap
In one of those now rare moods that used to be so common when I was new to Linux, I spent most of my week simply updating almost every package on my system to the latest stable release by compiling from source, including glibc! Much of it was a breeze (yes, even glibc), but Qt and KDE gave me the most grief - for some reason, uic from Qt simply omits the KDE headers required to access custom KDE widgets from KDE applications, causing the builds to irritatingly break every now and then. I think it is the fault of the ".ui" files in the KDE distribution, but wouldn't they have built and tested the distribution before release? I am confused, but I haven't found any answers via Google yet. >:-(

GCC keeps regressing in compile speed, especially for C++ code, with the result that Qt/KDE took an enormous amount of time to build with GCC 3.3.3 - I felt like going with Gtk+/GNOME just for this reason! But for some strange, possibly idiotic, reason, I persisted and the result is I must say quite pretty - KDE 3.2.1 feels much faster and is so gorgeous to look at! (For some reason, my display wallpaper change does not take effect at all, though Konqueror is able to display all these wallpapers just fine - does anyone have an idea why?)

An awesome side-effect is that everything is now rendered in TrueType fonts, albeit with so much weird anti-aliasing that it becomes difficult to read text for long. (A few years ago, I wouldn't have believed that this is going to be my primary complaint with my Linux desktop. :-) Who says we haven't made progress here?)

17 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!