[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#550625: libc6 2.7-18 realloc bug is NOT fixed



hey, this bug is not fixed 

> L2:~> dpkg -l | grep libc6
> ii  libc6                                2.7-18                     GNU C Library: Shared libraries
> ii  libc6-dev                            2.7-18                     GNU C Library: Development Libraries and Header Files
> ii  libc6-dev-i386                       2.7-18                     GNU C Library: 32bit development libraries for AMD64
> ii  libc6-i386                           2.7-18                     GNU C Library: 32bit shared libraries for AMD64

Linux L2 2.6.31.pfring #1 SMP Wed Sep 16 09:52:13 CEST 2009 x86_64 GNU/Linux
also with the default stable kernel 
Linux L1 2.6.26-2-amd64 #1 SMP Thu Nov 5 02:23:12 UTC 2009 x86_64 GNU/Linux

i have made this two test and the two test fails 

i get this two post for reference :
http://sources.redhat.com/bugzilla/show_bug.cgi?id=10018
https://bugzilla.redhat.com/show_bug.cgi?id=470831

can you reopen the bugs ?
avaiable for any question, also in msn or skype
msn: boos@core-dumped.info
skype: rmartelloni

------------------------------------------------------------------------

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

void* MyThread(void* arg) {

  while (1) {
    unsigned char* array = (unsigned char*)malloc(10000024);
    unsigned long i;
    for (i = 0; i < 10000024; i++) {
      array[i] = i % 256;
    }

    array = (unsigned char*)realloc(array, 20000048);
    for (i = 0; i < 10000024; i++) {
      assert(array[i] == i % 256);
    }
    free(array);
  }
  return NULL;
}

int main() {

  unsigned int i;
  pthread_t thread;
  for (i = 0; i < 8; ++i) {
    pthread_create(&thread, NULL, MyThread, NULL);
  }
  pthread_join(thread, NULL);

  return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
main(int argc, char **argv)
{
  char buf[200];
  char *fmt = argv[1];
  if (argc < 2)
    abort ();
  int n = snprintf (buf, sizeof buf, fmt, 1);
  return 0;
}

and all fails




Reply to: