[Bug 208403] devel/llvm37: apply upstream r243590 to prevent stack overflow in some cases

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 30 16:41:39 UTC 2016


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

            Bug ID: 208403
           Summary: devel/llvm37: apply upstream r243590 to prevent stack
                    overflow in some cases
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: brooks at FreeBSD.org
          Reporter: dim at FreeBSD.org
             Flags: maintainer-feedback?(brooks at FreeBSD.org)
          Assignee: brooks at FreeBSD.org

Created attachment 168793
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=168793&action=edit
Apply upstream llvm r243590

Koop Mast reported that on FreeBSD 10.1-R i386, devel/libclc gets a build
error, when its 'prepare-builtins' segfaults.  It turns out this is due to a
stack overflow, when recursively sorting an internal list.  Upstream, this was
changed to an iterative operation, to prevent stack overflow in some cases,
here:

http://reviews.llvm.org/rL243590
------------------------------------------------------------------------
r243590 | matze | 2015-07-30 01:22:48 +0200 (Thu, 30 Jul 2015) | 9 lines

IR: Implement Value::mergeUseLists() iteratively

This avoids stack overflows when the the compiler does not perform tail call
elimination. Apparently this happens for MSVC with the /Ob2 switch which
may be used by external code including this header.

Reported by and based on a patch from Jean-Francois Riendeau.

Related to rdar://21900756
------------------------------------------------------------------------

I have verified this allows devel/libclc to build successfully on 10.1-R.

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


More information about the freebsd-ports-bugs mailing list