joyent/libuv — pull request #663 by tfeb (2012-12-21 09:28:31+00:00)
Title: linux-core.c: ensure that all CPUs have model information of some kind

This patch makes sure that none of the model fields can be null: it either infers them from earlier fields or if no information was got it fills them with a default value ("unknown" in this fix).

This is not a problem on x86 but it can be on some other platforms where /proc/cpuinfo has a different format.

This fix makes no change to what is returned on platforms which were already getting all the model information (ie x86).

If the fields are left null then node calls like os.cpus() will cause bad things to happen (node will die).