Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Jun 2014 09:59:56 +0000 (UTC)
From: Thorsten Glaser <>
Subject: Re: thoughts on reallocarray, explicit_bzero?

Szabolcs Nagy <nsz <at>> writes:

> static size_t sizemul(size_t a, size_t b)
> {
> 	return b>1 && a>1 && a>-1/b ? -1 : a*b;
> }

There is no -1 in size_t. (And *you* complain about OpenBSD checks…)

> i don't see how the openbsd explicit_bzero stops the
> compiler to do optimizations..

On OpenBSD: by being in libc which is not built with LTO.
I’ve wondered about how to do this either. Maybe:

explicit_bzero(void *s, size_t n)
	bzero(s, n);

Then you #define __lto_boundary to something like
	__asm__ volatile ("" : : : "memory");
or some C11 barrier function.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.