[Top][All Lists]

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

[Tinycc-devel] Wierd realloc error (tcc bug?)

From: Chris
Subject: [Tinycc-devel] Wierd realloc error (tcc bug?)
Date: Sat, 15 May 2004 10:12:53 -0400 (EDT)

I don't know if this error will occur on other machines but it seems
fairly consistant on mine.  I'm using the TinyCC 0.9.20 from Debian
unstable and compiling with the bounds checking stuff (-b switch).


#include <stdlib.h>

int main()
   void *ary;

   ary = malloc(12);
   ary = realloc(ary, 2000);
   ary = realloc(ary, 12);

   return 0;

Compile with "tcc -b source.c"

The last realloc gives a "free(): invalid pointer" error on my system.

It only occurs if the last realloc is the same size as the initial
malloc() and the first realloc is of a large size.  A bug?

// Chris

reply via email to

[Prev in Thread] Current Thread [Next in Thread]