[LLVMbugs] [Bug 5226] New: Verifier should reject store to constant global

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Oct 17 06:42:54 PDT 2009


           Summary: Verifier should reject store to constant global
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu

opt -verify doesn't reject this, but should:

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

@c = constant i64 0
define i32 @foo() {
    store i64 4, i64* @c
    ret i32 0

At runtime this program crashes because it tries storing to readonly memory.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list