Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 10 Jan 2016 17:45:06 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: Possible infinite loop in qsort()

Am Sonntag, den 10.01.2016, 11:35 -0500 schrieb Morten Welinder:
> > In that case, you can massively optimize out the whole sort
> > by just counting the number of times each byte appears [...]
> 
> That isn't.  sizeof(char) is guaranteed to be 1.  Is it not, however,
> required to represent bytes.  You could have sizeof(pointer) be
> 1 also and if you so, you really cannot do sorting by counting.

Generally for C it isn't, but for POSIX it is. char there always have
8 bit. So if we are also supposing that pointers have more than 8 bit :)
we never have sizeof(pointer) to be 1. So in that sense we are safe for
musl.

Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::




Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

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.