[llvm-bugs] [Bug 37022] New: Segfault when attempting to assign to recursive struct

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 5 14:26:22 PDT 2018


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

            Bug ID: 37022
           Summary: Segfault when attempting to assign to recursive struct
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rymg19 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20164
  --> https://bugs.llvm.org/attachment.cgi?id=20164&action=edit
Clang output (includes stack trace)

Test case:


struct Infinite {
  struct Infinite nested;
};

void f(struct Infinite* x) { *x = 0; }


You can literally assign *anything* to *x, and the crash will occur.

Preprocessed source file (this is mostly insignificant in the test case for
obvious reasons), run script, and stack trace (in seg.log) attached.

-- 
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/20180405/c9372cee/attachment.html>


More information about the llvm-bugs mailing list