From: | Féliciano Matias <feliciano(dot)matias(at)free(dot)fr> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql and bytea |
Date: | 2003-06-10 06:21:32 |
Message-ID: | 1055226052.6253.11.camel@one.myworld |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Le ven 16/05/2003 à 06:56, Féliciano Matias a écrit :
> > All of this is used with postgresql 7.3.2 shipped with Red Hat Linux 9
> [...]
> I found the problem. It's bug in sprintf()
> ===============================================
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #define SIZE (1024*70000)
> int main(void) {
> char * s = malloc(SIZE) ;
> char * d = malloc(SIZE) ;
> memset(s, 'a', SIZE-1) ;
> d[SIZE-1] = '\0' ;
> sprintf(d,"%s",s) ;
> printf("%zi\n", strlen(d)) ;
> return 0 ;
> }
> ===============================================
> $ ./a.out
> 67108863 (2^26-1)
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90987
from
bugzilla(at)redhat(dot)com
------- Additional Comments From drepper(at)redhat(dot)com 2003-06-09 23:22 -------
The current glibc CVS code has been changed to not have this liimtation anymore.
--
Féliciano Matias <feliciano(dot)matias(at)free(dot)fr>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2003-06-10 07:04:10 | Re: SQL question |
Previous Message | Tom Lane | 2003-06-10 06:08:30 | Re: Thousands of semops for every i/o |