On Mon, Jan 28, 2013 at 12:27 PM, Niels Möller <ni...@lysator.liu.se> wrote:
> Daniel Schepler <dschep...@gmail.com> writes:
>
>> Here's the interim patch I'm currently using to build nettle on the 
>> unofficial
>> Debian x32 port.  Two issues it addresses:
>> - The camellia test fails.  I'm currently working around this by passing
>> --disable-assembler to configure on x32.
>
> Can be a bit tedious to track down. I usually print out intermediate
> values from a working build, and then step through the assembly in gdb
> to see in which round, and where in the round, values depart.
>
> Could also be some ABI issue (not necessarily limited to x32), like
> clobbering some register which is supposed to be preserved. Does x32 use
> the same ABI and calling conventions as plain x86_64?

Actually, I just noticed that the camellia test passed on the build of
nettle_2.5-1 in experimental -- I got just the des-compat failure.  So
this one might not need any action other than waiting for 2.5-1 to
eventually enter unstable (after the freeze).

(And yes, the x32 ABI is pretty much the same as plain x86_64 except
for the differences in sizes of pointers, long, etc.)

>
>> - The des-compat test segfaults.  It turns out compiling with -O1 instead of 
>> -
>> O2 fixes this, so this might be a compiler bug with the version of gcc I'm
>> currently using.
>
> Until proven otherwise, that sounds a bit like a compiler bug. Where
> does it crash (backtrace)?

I actually wasn't able to get a very useful backtrace.

(gdb) run
Starting program: /tmp/buildd/nettle-2.4/testsuite/des-compat-test
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Doing ecb
Encryption error  1
k=456E637279707469 p=0000000000000000 o=8CA64DE9C1B123A7 act=78474891E2836B6F

Program received signal SIGSEGV, Segmentation fault.
nettle_des_set_key (ctx=ctx@entry=0xffffd800,
    key=key@entry=0x8 <Address 0x8 out of bounds>) at des.c:207
207         w = (256 | *k++) << 2;
(gdb) bt
#0  nettle_des_set_key (ctx=ctx@entry=0xffffd800,
    key=key@entry=0x8 <Address 0x8 out of bounds>) at des.c:207
#1  0xf79b0a04 in nettle_openssl_des_key_sched (key=<optimized out>,
    ctx=<optimized out>) at des-compat.c:209
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
-- 
Daniel Schepler


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to