[Bug 222551] Code generated by Clang using union aliasing results in segmentation fault

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 24 11:31:19 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222551

            Bug ID: 222551
           Summary: Code generated by Clang using union aliasing results
                    in segmentation fault
           Product: Base System
           Version: 11.1-RELEASE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: 1983-01-06 at gmx.net

This was discovered while working on
https://svnweb.freebsd.org/ports/head/lang/duktape/.

Using a double and an int array with eight elements corrupts the union. The
issue has been reported against duktape:
https://github.com/svaarala/duktape/issues/1752 , though already known since
2103 (http://lists.llvm.org/pipermail/cfe-users/2013-December/000321.html) and
it turned out to be a Clang bug in FreeBSD which has been fixed in 5.0.0:
https://bugs.llvm.org/show_bug.cgi?id=32056.

I simple example is availabe at
https://github.com/svaarala/duktape/blob/master/misc/clang_aliasing.c.

The fix from Clang trunk requires a backport to 4.0.x and update in FreeBSD
base. Unfortunately, there is no workaround to this issue unless you install
llvm50 from ports.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list