Slashdot Mirror


GNU C Library Alternative Musl Libc Hits 1.0 Milestone

New submitter dalias (1978986) writes "The musl libc project has released version 1.0, the result of three years of development and testing. Musl is a lightweight, fast, simple, MIT-licensed, correctness-oriented alternative to the GNU C library (glibc), uClibc, or Android's Bionic. At this point musl provides all mandatory C99 and POSIX interfaces (plus a lot of widely-used extensions), and well over 5000 packages are known to build successfully against musl.

Several options are available for trying musl. Compiler toolchains are available from the musl-cross project, and several new musl-based Linux distributions are already available (Sabotage and Snowflake, among others). Some well-established distributions including OpenWRT and Gentoo are in the process of adding musl-based variants, and others (Aboriginal, Alpine, Bedrock, Dragora) are adopting musl as their default libc."
The What's New file contains release notes (you have to scroll to the bottom). There's also a handy chart comparing muscl to other libc implementations: it looks like musl is a better bet than dietlibc and uclibc for embedded use.

9 of 134 comments (clear)

  1. pkgsrc test results by staalmannen · · Score: 4, Informative

    For those curious about which "5000 packages" that build with musl, there is the awesome automated pkgsrc tests published: http://wiki.musl-libc.org/wiki...

  2. glibc is horribly bloated by uhmmmm · · Score: 4, Informative

    The first priority on musl is correctness, and they will take a hit to size and speed if that's what's necessary to achieve it. But thus far, they've been doing a good job of achieving correctness without introducing too much bloat.

    Take a look at their page on bugs found while developing musl, and you'll find that they've found and reported quite a few bugs in glibc where glibc had been "cutting corners".

    1. Re:glibc is horribly bloated by dalias · · Score: 4, Interesting

      I've submitted at least two bugfix patches to glibc where the diff was 100% "-" lines for things Drepper added. I believe they were all eventually committed. And thankfully this is the one type of glibc patch submission that doesn't require having a copyright assignment on file with the FSF. ;-)

    2. Re:glibc is horribly bloated by Just+Some+Guy · · Score: 5, Funny

      You're doing God's work, son.

      --
      Dewey, what part of this looks like authorities should be involved?
  3. Re:Either gnu libc is hideously slow and bloated.. by Improv · · Score: 5, Insightful

    Steps to a useless comment:
    1) Speculate on the features of something
    2) Note that that speculated feature set doesn't include something you want
    3) Criticise based on your speculation

    --
    For every problem, there is at least one solution that is simple, neat, and wrong.
  4. Link to comparison chart by paulpach · · Score: 4, Informative

    Here is a link to the comparison chart mentioned in the description.

  5. Re:Either gnu libc is hideously slow and bloated.. by dalias · · Score: 4, Informative

    At the time the comparison was made, glibc was essentially unmaintained and Debian-based distributions were using the eglibc fork. Now that glibc is under new leadership, eglibc is being discontinued and the important changes have been merged back to glibc upstream. So when I update the chart's quantitative comparisons, it will be for glibc rather than eglibc. The main things that will change when I do are significant increases in size (especially since I seem to have under-measured eglibc's totals) and possibly some improvements in performance. In terms of all the other qualitative comparisons, glibc remains about the same place it was before.

  6. Re:buffer overflow in printf ... great for securit by dalias · · Score: 4, Insightful

    Unlike some projects, we fully disclose bugs that might be relevant to security. In this instance, the bug could only be triggered by explicitly requesting sufficiently many decimal places (16445 for ld80) and printing a denormal long double with the lowest bit set, as in:

    printf("%.16445Lf", 0x1p-16445);

    In addition, even when triggered, it only wrote past the end of the buffer by one slot, and we were unable to get it to overwrite anything important like a return address (of course, what it overwrites depends on the compiler, so in principle it could).

  7. Re:Why should I drop glibc? by dalias · · Score: 4, Insightful

    If you don't want to switch, that's fine. You're still getting the benefits of musl, because competition has driven the glibc developers to fix, or at least study how to fix, a number of longstanding bugs in glibc.