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

Re: Major bug in mysql build (all versions since 4.1)

BERTRAND Joël napsal(a):
Daniel Smolik a écrit :
BERTRAND Joël napsal(a):
Frans Pop a écrit :

tags 334339 - wontfix

On Sunday 25 March 2007 20:02, BERTRAND Joël wrote:

    See bug #334339 (wontfix).

IMO the "wontfix" tag is not correct. There should at least be an explanation by the maintainer _why_ he considers this an issue that is does not need to be fixed. Removing the tag as it was added without any justification. AFAICT this is a real issue that should be solved.

    I aggree.

Bug was reported to mysql dev without success because dev have said that is a gcc-4.0 bug, not a mysql bug.

Yes, but the gcc maintainers have said that the bug there has been fixed
"long ago". Unfortunately they don't say in which version.

"has been fixed" ? I have tried to build mysql with _all_ gcc release between 3.3 and 4.1 without any success. Where have you seen that this bug was fixed ?

Maybe, but I think it is not very difficult to fix the configure.in
script to avoid this bug.

I have no idea about that and no idea how that would affect other architectures. Anyway, It is now probably too late to fix this for Etch.

I have no idea too. In a first time, I suspected a 32 bits wide userland and a 64 bits kernel... Maybe a trouble with gcc include on sparc architectures.



could you tell me if this bug
reported by me is the same as bug you reported ?

    Yes, I think. But to be sure, you have to apply my workaround.



I am  100% sure that my  colleague  found fundamentals  of this bug.
On SPARC linux is used thread safe version of gethostbyname genthostbyname_r. This function have third argument char buffer. But if this buffer is not correctly aligned (on SPARC / 4 ) program crashed with BUSS ERROR. I attach demonstrate program to test this issue. If you change size of buffer from 1002 to 1000 program start working.
I mean  that simple workaround on SPARC is not use gethostbyname_r.
I try report this bug to glibc. Because I mean that this is glibc bug or compatibility problem.


Mydatex s r.o.
email: smolik@mydatex.cz
mob: 604200362
tel: 226210085
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>

extern int h_errno;

int  main(void)

int ret;
const char *name="karotka";
char buf[1002];
int  tmp_errno,buflen;
struct hostent tmp_hostent,*hp;
//struct hostent_data hd;
int size;


//size=sizeof(struct hostent_data);

  printf("Align buff result=%p,buffer=%p,buflen=%d\n",&tmp_hostent,buf,buflen);

  ret=gethostbyname_r(name,&tmp_hostent, buf,buflen,&hp,&tmp_errno);  



Reply to: