curl-library
Re: Values of CURLOPT_NETRC - patch
Date: Wed, 15 May 2002 11:42:27 +0200 (MET DST)
On Wed, 15 May 2002, J. Cone wrote:
> On the way to re-delivering my patch, I am having problems with 32-bit curl
> on 64-bit HP-UX 11, compiled for memory debugging.
>
> It seems that malloc returns memory alligned on four-byte boundaries, but
> that double's, which are 8 bytes, require 8-byte alignment. The resulting
> alignment problem in the middle of a structure causes SIGBUS.
Aha. This is probably because of the memory debug's curl_domalloc() function.
I have this struct that I alloc:
struct memdebug {
int size;
char mem[1];
};
and then I return the struct->mem pointer. I bet that makes the memory 32bits
aligned which is badness. Try adding a dummy int between them:
struct memdebug {
int size;
int notused;
char mem[1];
};
This problem doesn't exist when you build without memory debugging, right?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/ _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.netReceived on 2002-05-15