conflict between Crypto++ 5.6.0 and GNU binutils 2.19.91.20091014-0ubuntu1

32 views
Skip to first unread message

Zooko O'Whielacronx

unread,
Oct 26, 2009, 11:03:54 PM10/26/09
to Crypto++ Users
When Ubuntu recently upgraded from GNU binutils
2.19.91.20091006-0ubuntu1 to 2.19.91.20091014-0ubuntu1 this broke the
build of Crypto++ 5.6.0 in such a way that building Crypto++ with the
new binutils results in indefinite hangs with max CPU usage or seg
faults. Here is the bug report at launchpad which includes the
history of me figuring out exactly which version of which tool
introduced this change and also has links to the pycryptopp buildbot
which shows Crypto++ 5.6.0 as built with the new binutils getting a
segfault. The buildbot also has a valgrind report. The launchpad
ticket also has links to the diffs between the most recent succeeding
version of binutils and the earliest failing version, but I don't know
enough about binutils to spot the problem.

If someone out there knows how to help, that would be great. In the
meantime, at least be aware that you shouldn't upgrade to Ubuntu 9.10
(due to be released tomorrow) if you want to build Crypto++ 5.6.0!

Regards,

Zooko

zooko

unread,
Oct 26, 2009, 11:06:24 PM10/26/09
to Crypto++ Users
Oh, I should mention that this issue is known to affect the amd64
platform and it is not known if it affects other platforms.

Wei Dai

unread,
Oct 27, 2009, 11:40:25 AM10/27/09
to Zooko O'Whielacronx, Crypto++ Users
The error is clearly occurring within the SHA256 inline assembly code. But I
have no idea what the (fairly large) binutil patch is doing. How can we find
out who submitted the the binutil patch and contact him or her?

I can also look at this in the debugger and see if I can fix it in Crypto++
code. Can you either give me a shell account on a machine that can reproduce
this, or tell me how to reproduce this, starting with a blank VMware
instance?

Until this is fixed, you can try to work around it by disabling the SHA256
(or all) assembly code.

--------------------------------------------------
From: "Zooko O'Whielacronx" <zoo...@gmail.com>
Sent: Tuesday, October 27, 2009 8:21 AM
To: "Wei Dai" <wei...@weidai.com>
Subject: Re: conflict between Crypto++ 5.6.0 and GNU binutils
2.19.91.20091014-0ubuntu1

> On Mon, Oct 26, 2009 at 9:08 PM, Wei Dai <wei...@weidai.com> wrote:
>> Link to the bug report?
>
> Whoops, sorry about that:
>
> https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/461303
>

zooko

unread,
Oct 27, 2009, 11:47:11 AM10/27/09
to Crypto++ Users
On Oct 27, 9:40 am, "Wei Dai" <wei...@weidai.com> wrote:
> The error is clearly occurring within the SHA256 inline assembly code. But I
> have no idea what the (fairly large) binutil patch is doing. How can we find
> out who submitted the the binutil patch and contact him or her?

I've posted to https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/461303
asking that question. I suppose the patch came from "upstream"
binutils, i.e. the Ubuntu folks acquired the patch from the binutils
folks, but I'm not sure how to trace its exact provenance.

> I can also look at this in the debugger and see if I can fix it in Crypto++
> code. Can you either give me a shell account on a machine that can reproduce
> this, or tell me how to reproduce this, starting with a blank VMware
> instance?

To reproduce:

Install Ubuntu Karmic Koala (release candidate or final release)
Get the Crypto++ 5.6.0 source code
run "make"
run "cryptest.exe v"

> Until this is fixed, you can try to work around it by disabling the SHA256
> (or all) assembly code.

Thanks for the work-around idea. Maybe I could have my build script
test the version of the GNU assembler and disable ASM if it is the
known-bad version.

Zooko O'Whielacronx

unread,
Oct 27, 2009, 10:22:54 PM10/27/09
to Crypto++ Users
Matthias Klose from the Debian and Ubuntu projects has identified
which exactly patch to GNU assembler causes the problem:

http://sourceware.org/bugzilla/show_bug.cgi?id=10856

Wei Dai

unread,
Oct 28, 2009, 9:19:37 AM10/28/09
to Zooko O'Whielacronx, Crypto++ Users
Cool, it looks like the the bug has been fixed in GAS. Hopefully that will
get into the Ubuntu release, or into an update shortly after. Let me know if
I still need to do anything.

--------------------------------------------------
From: "Zooko O'Whielacronx" <zoo...@gmail.com>
Sent: Tuesday, October 27, 2009 7:22 PM
To: "Crypto++ Users" <cryptop...@googlegroups.com>
Subject: Re: conflict between Crypto++ 5.6.0 and GNU binutils
2.19.91.20091014-0ubuntu1

>
Reply all
Reply to author
Forward
0 new messages