On Thu, 2005-10-27 at 03:06 -0400, Diego Bauche Madero wrote:

> --- tinycc-orig/tccelf.c        2005-10-27 02:43:35.000000000 -0400
> +++ tinycc/tccelf.c     2005-10-27 02:55:19.000000000 -0400
> @@ -2184,6 +2184,8 @@ static int tcc_load_dll(TCCState *s1, in
>          switch(dt->d_tag) {
>          case DT_NEEDED:
>              name = dynstr + dt->d_un.d_val;
> +            if ((Elf32_Dyn *)name > dynamic + (nb_dts * sizeof(Elf32_Dyn)))
> +                goto the_end;
>              for(i = 0; i < s1->nb_loaded_dlls; i++) {
>                  dllref = s1->loaded_dlls[i];
>                  if (!strcmp(name, dllref->name))
> 

WOW - Excellent work.  I can't honestly say if the fault is TCC or GCC,
or if they just don't like each other mutually, but a patch that makes
TCC work both ways is excellent news.

Now I'm wondering if that patch will make tcc work with boehm's GC.  Its
entirely possible that my previous problems with that library were due
to it being compiled with GCC, and considering that a GC will hit most
all of RAM looking for roots, it is very likely to hit such a bug.

Hopefully it will get comitted to CVS.





_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to