<pre style='margin:0'>
Jeremy Huddleston Sequoia (jeremyhu) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0e5bec3e28bba6cd8ed2c5666fed31e2f08cbfa3">https://github.com/macports/macports-ports/commit/0e5bec3e28bba6cd8ed2c5666fed31e2f08cbfa3</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'>     new 0e5bec3  ld64-{236,latest}: Address possible buffer overflow on large .o files and build failure with newer clang
</span>0e5bec3 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 0e5bec3e28bba6cd8ed2c5666fed31e2f08cbfa3
</span>Author: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
AuthorDate: Sun Nov 26 09:09:09 2017 -0800

<span style='display:block; white-space:pre;color:#404040;'>    ld64-{236,latest}: Address possible buffer overflow on large .o files and build failure with newer clang
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
</span>---
 devel/ld64/Portfile                | 10 +++++++---
 devel/ld64/files/PR-28988396.patch | 28 ++++++++++++++++++++++++++++
 devel/ld64/files/PR-33746767.patch | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 3 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/ld64/Portfile b/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 26fb0a9..67650c4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -110,7 +110,7 @@ subport ld64-136 {
</span> subport ld64-236 {
     # XCode 5.1
     version             236.3
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    revision            7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    revision            8
</span> 
     # http://trac.macports.org/ticket/43737
     # < 100 is a guess.  Xcode 4.1 might work, so I'm leaving it as an option unless someone reports a failure.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -126,7 +126,9 @@ subport ld64-236 {
</span>         ld64-136-i386-badAddress.patch \
         PR-16935960.patch \
         PR-16936488.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        PR-28988396.patch \
</span>         PR-29117886.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        PR-33746767.patch \
</span>         ld64-ppc-9610466.patch
 
     if {${configure.cxx_stdlib} eq "libstdc++"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -144,7 +146,7 @@ subport ld64-236 {
</span> subport ld64-latest {
     # XCode 8.2.1
     version             274.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    revision            1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    revision            2
</span> 
     # https://trac.macports.org/ticket/43737
     # https://trac.macports.org/ticket/50130
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -160,10 +162,12 @@ subport ld64-latest {
</span>         ld64-136-i386-badAddress.patch \
         ld64-ppc-9610466.patch \
         PR-49393.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        PR-28988396.patch \
</span>         PR-29117886.patch \
         PR-29679726.patch \
         PR-29723276.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        PR-29723629.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        PR-29723629.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        PR-33746767.patch
</span> 
     depends_lib-append port:libcxx
     configure.cxx_stdlib libc++
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/ld64/files/PR-28988396.patch b/devel/ld64/files/PR-28988396.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..049a818
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/ld64/files/PR-28988396.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,28 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ld/parsers/macho_relocatable_file.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ld/parsers/macho_relocatable_file.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1757,11 +1757,14 @@ typename A::P::uint_t Parser<A>::realAddr(typename A::P::uint_t addr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define STACK_ALLOC_IF_SMALL(_type, _name, _actual_count, _maxCount) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _type*  _name = NULL;   \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   uint32_t _name##_count = 1; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-  if ( _actual_count > _maxCount ) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  uint32_t _name##_stack_count = _actual_count; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  if ( _actual_count > _maxCount ) { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           _name = (_type*)malloc(sizeof(_type) * _actual_count); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++          _name##_stack_count = 1; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  } \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           _name##_count = _actual_count; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-  _type  _name##_buffer[_name##_count]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  _type _name##_buffer[_name##_stack_count]; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if ( _name == NULL ) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           _name = _name##_buffer;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1812,7 +1815,7 @@ ld::relocatable::File* Parser<A>::parse(const ParserOptions& opts)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   // create lists of address that already have compact unwind and thus don't need the dwarf parsed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   unsigned cuLsdaCount = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-  pint_t cuStarts[countOfCUs];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++  STACK_ALLOC_IF_SMALL(pint_t, cuStarts, countOfCUs, 1024);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   for (uint32_t i=0; i < countOfCUs; ++i) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           if ( CUSection<A>::encodingMeansUseDwarf(cuInfoArray[i].compactUnwindInfo) )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   cuStarts[i] = -1;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/ld64/files/PR-33746767.patch b/devel/ld64/files/PR-33746767.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..ae43dfe
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/ld64/files/PR-33746767.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ld/parsers/macho_relocatable_file.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ld/parsers/macho_relocatable_file.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4495,7 +4495,7 @@ bool CFISection<A>::needsRelocating()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template <>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void CFISection<x86_64>::cfiParse(class Parser<x86_64>& parser, uint8_t* buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                                                                  libunwind::CFI_Atom_Info<CFISection<x86_64>::OAS>::CFI_Atom_Info cfiArray[], 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                                                                  libunwind::CFI_Atom_Info<CFISection<x86_64>::OAS> cfiArray[],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                                                   uint32_t& count, const pint_t cuStarts[], uint32_t cuCount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   const uint32_t sectionSize = this->_machOSection->size();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4560,7 +4560,7 @@ void CFISection<x86_64>::cfiParse(class Parser<x86_64>& parser, uint8_t* buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template <>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void CFISection<x86>::cfiParse(class Parser<x86>& parser, uint8_t* buffer, 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                                                                  libunwind::CFI_Atom_Info<CFISection<x86>::OAS>::CFI_Atom_Info cfiArray[], 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                                                                  libunwind::CFI_Atom_Info<CFISection<x86>::OAS> cfiArray[],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                                                   uint32_t& count, const pint_t cuStarts[], uint32_t cuCount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   // create ObjectAddressSpace object for use by libunwind
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4581,7 +4581,7 @@ void CFISection<x86>::cfiParse(class Parser<x86>& parser, uint8_t* buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template <>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void CFISection<arm>::cfiParse(class Parser<arm>& parser, uint8_t* buffer, 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                                                                  libunwind::CFI_Atom_Info<CFISection<arm>::OAS>::CFI_Atom_Info cfiArray[], 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                                                                  libunwind::CFI_Atom_Info<CFISection<arm>::OAS> cfiArray[],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                                                   uint32_t& count, const pint_t cuStarts[], uint32_t cuCount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if ( !parser.armUsesZeroCostExceptions() ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4607,7 +4607,7 @@ void CFISection<arm>::cfiParse(class Parser<arm>& parser, uint8_t* buffer,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template <>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void CFISection<arm64>::cfiParse(class Parser<arm64>& parser, uint8_t* buffer, 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                                                                  libunwind::CFI_Atom_Info<CFISection<arm64>::OAS>::CFI_Atom_Info cfiArray[], 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                                                                  libunwind::CFI_Atom_Info<CFISection<arm64>::OAS> cfiArray[],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                                                   uint32_t& count, const pint_t cuStarts[], uint32_t cuCount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   // copy __eh_frame data to buffer
</span></pre><pre style='margin:0'>

</pre>