Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGDMk9G6m7Td28JP-+isNKHNHPKGsSdfmu8Kjd07YNMcbhyXNQ@mail.gmail.com>
Date: Fri, 21 Mar 2014 16:16:29 -0400
From: John Mudd <johnbmudd@...il.com>
To: Rich Felker <dalias@...ifal.cx>
Cc: musl <musl@...ts.openwall.com>
Subject: Re: Build on linux 2.6 and run on linux 2.4?

You're too modest? Here's what I get when I build a simple C program on 2.6
without musl and try to run on the RH "2.4".

$ test_malloc
FATAL: kernel too old
Segmentation fault
$

$ cat test_malloc.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <malloc.h>
#include <memory.h>
#include <assert.h>

int main(int argc, char *argv[])
{
    assert(argc == 2);

    int n = atoi(argv[1]);
    char *c = malloc(n);
    printf("allocated.\n");
    memset(c, 0, n);
    printf("set.\n");
    printf("sleeping...\n");
    sleep(60);

    return 0;
}
$




On Fri, Mar 21, 2014 at 3:53 PM, Rich Felker <dalias@...ifal.cx> wrote:

> On Fri, Mar 21, 2014 at 03:48:31PM -0400, John Mudd wrote:
> > $ getconf GNU_LIBPTHREAD_VERSION
> > NPTL 0.60
> > $
> >
> > So that's it, I lucked out? I can start building my apps on a modern
> Linux
> > and still run on my older ones? If so then this is like being told time
> > travel is possible.
>
> Your luck is just that your kernel that claims to be 2.4 is really
> essentially 2.6, so it's not as old as you think it is. My impression
> is that "enterprise" vendors like RH like to stick with the version
> number that was widely known as being stable and reliable at the time,
> and end up applying so many patches/backports/local customizations
> that the old version number is pretty misleading.
>
> Anyway, if your goal is just to be able to run programs on this
> version of RHEL, you should be fine! If you also need to run on other
> old systems that print "2.4" as their version number, you probably
> need to do further research.
>
> Rich
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.