Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ee2aafaa017e4aed7f26b31fd5717dd@smtp.hushmail.com>
Date: Wed, 9 Sep 2015 12:03:08 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Large stack alignment

On 2015-09-08 21:45, magnum wrote:

> /*
> * I had to place this in a separate function to avoid having the unaligned
> * branch optimized away (even using -O0), since gcc is totally convinced it
> * simply can't be unaligned!
> */
> void out(char *pt)
> {
> 	if ((size_t)pt & 31)
> 		printf("%s unaligned!\n", pt);
> 	else
> 		puts(pt);
> }

Come to think of it, this is troubling: It suggests that the macro form 
of mem_align() might also be optimized away, doesn't it?!

Also, I'm puzzled anything is optimized away at -O0. But it was - there 
wasn't even any "%s unaligned!\n" string in the assembly output.

magnum

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.