Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 May 2014 14:46:51 -0400
From: James Cloos <cloos@...loos.com>
To: Rich Felker <dalias@...c.org>
Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,  musl@...ts.openwall.com
Subject: Re: Broken GCC versions: 4.8.2 and 4.9.0

What does the wrong assembly of your test code look like?

The assembly I get looks reasonable, in that it always references foo:

The O3 version is:

	.file	"test.c"
	.text
	.p2align 5,,31
	.globl	bar
	.type	bar, @function
bar:
.LFB0:
	.cfi_startproc
	movl	foo(%rip), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	setne	%al
	ret
	.cfi_endproc
.LFE0:
	.size	bar, .-bar
	.section	.rodata
	.align 4
	.type	dummy, @object
	.size	dummy, 4
dummy:
	.zero	4
	.weak	foo
	.set	foo,dummy
	.ident	"GCC: (Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest) 4.8.2"
	.section	.note.GNU-stack,"",@progbits

Every version tests foo(%rip) and gets the result into %rax.

The ia32, arm32 and arm64 assembly looks right, too.

Perhaps distribution patches affect this?

-JimC
--
James Cloos <cloos@...loos.com>         OpenPGP: 0x997A9F17ED7DAEA6

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.