[openssl-dev] [openssl.org #4441] Re: VIA C7-D processor: Hang in 30-test_afalg.t
noloader@gmail.com via RT
rt at openssl.org
Thu Mar 17 23:47:37 UTC 2016
I was looking at the code for afalg_fin_cipher_aio in engines/afalg/e_afalg.c:
int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,
size_t len)
{
int r;
int retry = 0;
unsigned int done = 0;
struct iocb *cb;
struct timespec timeout;
struct io_event events[MAX_INFLIGHTS];
u_int64_t eval = 0;
timeout.tv_sec = 0;
timeout.tv_nsec = 0;
cb = &(aio->cbt[0 % MAX_INFLIGHTS]);
memset(cb, '\0', sizeof(*cb));
cb->aio_fildes = sfd;
cb->aio_lio_opcode = IOCB_CMD_PREAD;
cb->aio_buf = (unsigned long)buf;
cb->aio_offset = 0;
cb->aio_data = 0;
cb->aio_nbytes = len;
cb->aio_flags = IOCB_FLAG_RESFD;
cb->aio_resfd = aio->efd;
...
That cast of 'buf' from 'unsigned char*' to 'unsigned long' does not
quite look right.
I think the [mostly] portable way to turn a pointer into an integral
is a uintptr_t or size_t. I'm not sure about uintptr_t availability
because of std=c89/90. size_t will work for most platforms; but the
one I am aware it will fail is older hardware like i386/i486 with
16-bit segments and 32-bit registers.
Can anyone confirm that's supposed to be happening?
On Thu, Mar 10, 2016 at 2:29 PM, Jeffrey Walton <noloader at gmail.com> wrote:
> Working from Master:
>
> $ git reset --hard HEAD && git pull
> HEAD is now at fb04434 In the recipe using "makedepend", make sure the
> object file extension is there
> Already up-to-date.
>
> $ ./config
> ...
> $ make depend && make clean && make
> ...
> $ make test
> ...
> ( cd test; \
> SRCTOP=../. \
> BLDTOP=../. \
> EXE_EXT= \
> /usr/bin/perl .././test/run_tests.pl )
> ../test/recipes/01-test_ordinals.t ........ ok
> ../test/recipes/05-test_bf.t .............. ok
> ...
> ../test/recipes/25-test_x509.t ............ ok
> ../test/recipes/30-test_afalg.t ...........
> ^C (after about 20 minutes)
> ...
--
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4441
Please log in as guest with password guest if prompted
More information about the openssl-dev
mailing list