test fails because unhandled alignment trap

Bug #719305 reported by Jani Monoses
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vowpal-wabbit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vowpal-wabbit

The package FTBFS on armel. It builds actually but the testsuite fails.

This is in dmesg

[ 4806.357452] Alignment trap: not handling instruction ecb08a01 at [<00014658>]
[ 4806.365600] Unhandled fault: alignment exception (0x011) at 0x01563321

This being a numerically intensive library it is compiled in Debian with -ffast-math. On armel this makes gcc emit some vector instructions and which are not handled by the kernel's alignment trap handler and the test crashes on a vldmia

  0x00014658 <read_cached_features(parser*, void*)+312>: b0 ec 01 8a vldmiane r0!, {s16}

The C code that is compiled here uses a char * that is used to access data, so maybe that is the source of the problem.

for (;c!= end;)
        {
          feature f = {1., 0};
          size_t temp = f.weight_index;
          c = run_len_decode(c,temp);
          f.weight_index = temp;
          if (f.weight_index & neg_1)
            f.x = -1.;
          else if (f.weight_index & general) {
              f.x = *(float *)c;
              c += sizeof(float); // PC at crash
            }
          *our_sum_feat_sq += f.x*f.x;
          size_t diff = f.weight_index >> 2;
          int32_t s_diff = ZigZagDecode(diff);
          if (s_diff < 0)
            ae->sorted = false;
          f.weight_index = last + s_diff;
          last = f.weight_index;
          f.weight_index = f.weight_index & mask;
          push(*ours, f);
        }

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vowpal-wabbit - 5.0-1ubuntu1

---------------
vowpal-wabbit (5.0-1ubuntu1) natty; urgency=low

  * debian/patches/arm_alignment_fault.patch: Work around an ARM
    alignment trap caused by accessing unaligned float values.
    Thanks to Nicolas Pitre for suggesting the trick of casting
    to a packed struct containing a single float value.
    Fixes armel FTBFS (LP: #719305)
 -- Jani Monoses <email address hidden> Tue, 15 Feb 2011 21:57:50 +0200

Changed in vowpal-wabbit (Ubuntu):
status: New → Fix Released
Revision history for this message
Jani Monoses (jani) wrote :

BTW it was not ffast-math, even without any options gcc would emit VFP instructions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.