On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote:
On 9 October 2012 13:27, m...@freebsd.org wrote:
The original behavior can be recovered by using inline assembly to
fetch the value from a register into a local C variable; this would at
least not rely on undefined behavior. But
On 11.10.2012 19:23, Peter Wemm wrote:
On Thu, Oct 11, 2012 at 6:14 AM, Andrey Chernov a...@freebsd.org wrote:
On 11.10.2012 15:44, Pawel Jakub Dawidek wrote:
On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote:
On 9 October 2012 13:27, m...@freebsd.org wrote:
The original behavior
Do you check assembler output for _both_ cases?
In my testing clang and gcc xor's 'junk' properly in case it have
'volatile' keyword (as in srandomdev()) and elide it without 'volatile'.
IMHO this change should be backed out for srandomdev() and adding
'volatile' for sranddev() instead.
On
On 9 Oct 2012, at 17:33, Andrey Chernov wrote:
Do you check assembler output for _both_ cases?
In my testing clang and gcc xor's 'junk' properly in case it have
'volatile' keyword (as in srandomdev()) and elide it without 'volatile'.
IMHO this change should be backed out for srandomdev() and
On Tue, Oct 9, 2012 at 10:16 AM, David Chisnall thera...@freebsd.org wrote:
On 9 Oct 2012, at 17:33, Andrey Chernov wrote:
Do you check assembler output for _both_ cases?
In my testing clang and gcc xor's 'junk' properly in case it have
'volatile' keyword (as in srandomdev()) and elide it
On 9 October 2012 12:33, Andrey Chernov a...@freebsd.org wrote:
Do you check assembler output for _both_ cases?
Yes.
In my testing clang and gcc xor's 'junk' properly in case it have
'volatile' keyword (as in srandomdev()) and elide it without 'volatile'.
volatile is still undefined: see
On 9 October 2012 13:27, m...@freebsd.org wrote:
The original behavior can be recovered by using inline assembly to
fetch the value from a register into a local C variable; this would at
least not rely on undefined behavior. But I agree it's of dubious
value anyways.
I proposed this (with a
On 9 October 2012 13:16, David Chisnall thera...@freebsd.org wrote:
On 9 Oct 2012, at 17:33, Andrey Chernov wrote:
Do you check assembler output for _both_ cases?
In my testing clang and gcc xor's 'junk' properly in case it have
'volatile' keyword (as in srandomdev()) and elide it without
On 09.10.2012 21:47, Eitan Adler wrote:
On 9 October 2012 12:33, Andrey Chernov a...@freebsd.org wrote:
Do you check assembler output for _both_ cases?
Yes.
...
http://blog.eitanadler.com/2012/10/reduced-entropy-in-rand-and-random.html
At this URL I see only already known buggy assembler
On 9 October 2012 14:24, Andrey Chernov a...@freebsd.org wrote:
I don't have ISO9899 nearby, could you directly quote mentioned
sections, please?
Accesses to volatile object (a) produce side effects (b) have
implementation defined values.
A more careful re-reading of the relevant section leads
On Tue, Oct 09, 2012 at 04:23:59PM -0400, Eitan Adler wrote:
On 9 October 2012 14:24, Andrey Chernov a...@freebsd.org wrote:
I don't have ISO9899 nearby, could you directly quote mentioned
sections, please?
Accesses to volatile object (a) produce side effects (b) have
implementation
On 9 October 2012 17:25, Steve Kargl s...@troutmask.apl.washington.edu wrote:
... yes, I was misreading the text.
Clang has no way of determining if 'a' is initialized or not.
If David is correct that 'junk' is optimized out by clang/llvm,
then it seems that clang violates footnote 116. Yes,
On 9 October 2012 18:06, Eitan Adler ead...@freebsd.org wrote:
On 9 October 2012 17:25, Steve Kargl s...@troutmask.apl.washington.edu
wrote:
... yes, I was misreading the text.
Clang has no way of determining if 'a' is initialized or not.
If David is correct that 'junk' is optimized out by
On Tue, Oct 09, 2012 at 06:06:55PM -0400, Eitan Adler wrote:
On 9 October 2012 17:25, Steve Kargl s...@troutmask.apl.washington.edu
wrote:
... yes, I was misreading the text.
Clang has no way of determining if 'a' is initialized or not.
If David is correct that 'junk' is optimized out
14 matches
Mail list logo