[llvm-bugs] [Bug 44129] New: stack-probe fails to probe correctly due to overflow if stack is greater than 4GB

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 23 20:08:01 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44129

            Bug ID: 44129
           Summary: stack-probe fails to probe correctly due to overflow
                    if stack is greater than 4GB
           Product: libraries
           Version: 9.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: simonas+llvm.org at kazlauskas.me
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

Given this example

```
target triple = "x86_64-unknown-linux-gnu"

define void @foo() unnamed_addr #0 {
start:
  %b = alloca i64, align 8
  %c = alloca [4294967295 x i8], align 1
  ret void
}

attributes #0 = { nonlazybind uwtable "probe-stack"="probe_stack"
"target-cpu"="x86-64" }
```

which when compiled with `llc -filetype=asm test.ll -o -` will output:

```
foo:
        movl    $8, %eax
        callq   probe_stack
...
```

Note that the probe size has overflowed and we are now probing just for 8
bytes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191124/0a2441d8/attachment-0001.html>


More information about the llvm-bugs mailing list