[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#333766: libc6: SIGBUS in libm on hppa breaks qt-x11-free



Package: libc6
Version: 2.3.5-6.0.1
Severity: serious
Justification: this is the bug that broke the toolkit that held up the \
  C++ transition that ruined the port that HP built

Hey Goto-san,

There is a bug in libm that results in unaligned access on hppa when calling
feholdexcept() or fegetenv().  Trivially reproducible with the following
code:

#include <fenv.h>

int main() {
        int foo;
        fenv_t fenv;
        feholdexcept(&fenv);
}

I'm afraid I can't offer a patch for this since I don't speak hppa assembly,
but the issue (and the fix) should be pretty obvious: fenv_t is a struct
composed of unsigned ints, so only 32-bit alignment is guaranteed;
feholdexcept() and fegetenv() populate the 8-int struct using four calls,
which means each call acts on 64 bits...  and SIGBUS.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/

Attachment: signature.asc
Description: Digital signature


Reply to: