<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - x86_stdcallcc: Assertion hit when passing more than 2^16 bytes on the stack"
   href="http://llvm.org/bugs/show_bug.cgi?id=20292">20292</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>x86_stdcallcc: Assertion hit when passing more than 2^16 bytes on the stack
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>code@klickverbot.at
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Generating code for the following piece of IR currently asserts as
X86TargetLowering::LowerReturn tries to fit the number of bytes to pop on
function exit into a 16 bit constant:

---
target datalayout =
"e-p:32:32:32-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f16:16:16-f32:32:32-f64:32:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i386-unknown-linux-gnu"

%bar = type { [16385 x i32] }

define x86_stdcallcc void @foo(%bar* byval %s_arg) {
  ret void
}
---

Of course, passing such a large object on the stack is rather nonsensical, but
I think this is somewhat problematic as IR that passes the validator/… silently
leads to wrong code being generated ("ret $4") when LLVM is built without
assertions.

Is it worth supporting this, or should there simply be a fatal error in
X86TargetLowering::LowerReturn when encountering such large sizes?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>