Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

wrongful segfault in generated code #12991

Closed Quuxplusone closed 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR12885
Status RESOLVED FIXED
Importance P enhancement
Reported by John Regehr (regehr@cs.utah.edu)
Reported on 2012-05-18 23:53:48 -0700
Last modified on 2012-07-13 13:50:53 -0700
Version trunk
Hardware PC Linux
CC chenyang@cs.utah.edu, flash@pobox.com, llvm-bugs@lists.llvm.org, peter@pcc.me.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
[regehr@dyson r52]$ clang -v
clang version 3.2 (trunk 157064)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr@dyson r52]$ clang -O0 small.c ; ./a.out
[regehr@dyson r52]$ clang -O small.c ; ./a.out
Segmentation fault
[regehr@dyson r52]$ cat small.c
struct S1
{
    int f0;
    int f2;
    int f3;
    int f6;
    char f8;
} a[1];
int
main ()
{
    struct S1 b[] = { 1, 1, 1, 1, 1, 1, 1 };
    b[0].f0 = 0;
    a[0] = b[1];
    return 0;
}
Quuxplusone commented 12 years ago

Fixed as of r157134.