Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: ppapi/native_client/tests/nacl_browser/pnacl_client_translator/bad2.pexe

Issue 10914053: Relocating files in the nacl repo that belong in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/tests/nacl_browser/pnacl_client_translator/bad2.pexe
diff --git a/ppapi/native_client/tests/nacl_browser/pnacl_client_translator/bad2.pexe b/ppapi/native_client/tests/nacl_browser/pnacl_client_translator/bad2.pexe
new file mode 100644
index 0000000000000000000000000000000000000000..41bc8b2efcd854f14d716914bf409a1e21a00268
--- /dev/null
+++ b/ppapi/native_client/tests/nacl_browser/pnacl_client_translator/bad2.pexe
@@ -0,0 +1,36 @@
+;; For now, we are using a .ll file as a "pexe". This is only a bad pexe
+;; in the sense that it shouldn't compile (missing instruction),
+;; not that it will crash LLC. Eventually we should make this into
+;; a bitcode file w/ the proper pexe metadata.
+
+;; To actually crash LLC (and do so reliably), perhaps we could add
+;; an SRPC method to LLC to ask it to crash itself.
+;; That seems much more reliable than trying to find a bitcode file that
+;; for version X will crash LLC, but for version Y it has been fixed.
+
+@.str = private unnamed_addr constant [12 x i8] c"Hello world\00", align 4
+
+define i32 @main(i32 %argc, i8** %argv) nounwind {
+entry:
+ %argc_addr = alloca i32, align 4
+ %argv_addr = alloca i8**, align 4
+ %retval = alloca i32
+ %0 = alloca i32
+ %"alloca point" = bitcast i32 0 to i32
+ store i32 %argc, i32* %argc_addr
+ store i8** %argv, i8*** %argv_addr
+ %1 = call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0)) nounwind
+ store i32 0, i32* %0, align 4
+
+;; Intentionally comment this line out to make it fail to compile.
+;; %2 = load i32* %0, align 4
+
+ store i32 %2, i32* %retval, align 4
+ br label %return
+
+return: ; preds = %entry
+ %retval1 = load i32* %retval
+ ret i32 %retval1
+}
+
+declare i32 @puts(i8*)

Powered by Google App Engine
This is Rietveld 408576698